ciderapp / Cider

A new cross-platform Apple Music experience based on Electron and Vue.js written from scratch with performance in mind. 🚀
https://cider.sh
GNU Affero General Public License v3.0
7.16k stars 341 forks source link

[Bug]: Cider is not remembering window position #1362

Closed Naxterra closed 4 months ago

Naxterra commented 2 years ago

Describe the Bug

When I restart Cider, it always opens in full screen mode. I am changing window position every time I restart the app but still it is not remembering last used window position.

I tried enabling and disabling Native Title Bar and setting hardware renderer to WebGPU and default but nothing changed.

Steps to Reproduce

1- Start Cider 2- Adjust window position 3- Close and start Cider again 4- It open in full screen mode. 5- When I double click on top bar, it switches to windowed mode but not to my configured window size.

Environment Information

Anything else?

No response

Code of Conduct

Disclaimer

yazninja commented 2 years ago

Your window config might be bugged. In any case try deleting Cider's appdata

rmdir /S /Q %appdata%\Cider just type this into cmd and restart the app.

*Note: this would make you sign in to apple music again

Naxterra commented 2 years ago

I deleted C:\Users\xxx\AppData\Roaming\Cider folder completely and then started Cider again. I entered my Apple credentials, adjusted window, started a playlist, and closed Cider. After that I reopened Cider again but window position got reset. At least it is not opening in full screen mode anymore.

DeN-AlB commented 2 years ago

Same here. Window position is not remembered. Just changed the properties of the desktop shortcut and enabled "maximized" so Cider starts in fullscreen now. Would be great if Cider is remembering the window position.

ozumado commented 2 years ago

Same here. It does not remember position/size of the window, would be great if it did...

cryptofyre commented 2 years ago

I'm investigating the issue.

cryptofyre commented 2 years ago

Technically this should work but it appears that it's not saving the attributes on close. This may be because the user is alt+f4'ing the application causing the exit event not to trigger therefore not saving the final size/position.

I'll keep an eye on this for now.

DeN-AlB commented 2 years ago

This may be because the user is alt+f4'ing the application

I'm just closing the app with the help of the close button, not pressing ALT+F4.

GGrandma commented 2 years ago

I was having the same issue, deleting window-state.json fixed the issue for me. The file can be found at %APPDATA%/Cider/window-state.json. Although it is odd entirely deleting the Cider folder did not fix this issue for most.

Alikbra commented 12 months ago

why not save directly new window position after releasing the window? this should prevent the alt+f4 "bug"

SynergiAios commented 4 months ago

It is not just not saving it onclose, it is also not loading it onstart.

"visual": { "appearance": "auto", "layoutType": "default", "layoutView": "HHh LpR FFf", "useAdaptiveColors": false, "adaptiveColorPercent": 10, "viewTransitions": true, "prefersReducedMotion": false, "hardwareAcceleration": "default", "windowSize": [ 1024, 1024 ], "windowPosition": [ 0, 0 ], "titleBarStyle": "default", "artworkLoadingMethod": "lazy", "artworkBlurMap": { "fpsLimit": 30 },

You can set windowSize to whatever you want, it is ignored onStart.