-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OS X: Window position after fullscreen #4178
Comments
i think i had a reason why i did this. like a window ending up on a different screen in some circumstances. i will look into it. |
when forcibly moving windows to a different screen with --screen or --fs-screen we need to move the window into the screen bounds if the window is out of bounds, otherwise it can end up on the wrong screen. previously it always recalculated the bounds and moved the window when toggling fullscreen, now it only does the bound calculation when changing screens. Fixes mpv-player#4178
okay there are a few cases where i need to force the window within the bounds, so i simplified it to always force it within the bounds. anyway i added a more sophisticated logic now that doesn't recalculate the bounds and won't move the window on the same screen if not necessary. i took a bit longer since while i tried to fix your issue and get the wished behaviour i found a few errors in the recalculating code and a segfault. anyway if you want to test it try this branch. |
when forcibly moving windows to a different screen with --screen or --fs-screen we need to move the window into the screen bounds if the window is out of bounds, otherwise it can end up on the wrong screen. previously it always recalculated the bounds and moved the window when toggling fullscreen, now it only does the bound calculation when changing screens. Fixes mpv-player#4178
Thanks for your work! I used your branch and it has solved the problem for me. |
mpv version and platform
mpv git-992e582
Reproduction steps
Expected behavior
Window gets restored to original position.
Actual behavior
Window is moved.
Issue started appearing after the fullscreen refactoring of a8347eb.
The
calculateWindowPositionForScreen
function should only be called if the screen changed in my opinion. When I remove the calculations in this method the behavior is restored to what I would expect.The text was updated successfully, but these errors were encountered: