You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move window to the side of a screen so that part of it is out of bounds (Alternatively open a video which is larger than the screen)
Go into fullscreen
Exit fullscreen
The window position has now moved so that it is no longer out of bounds (If the video was larger than the screen the upper left corner is now visible)
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.
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.
Thanks for your work! I used your branch and it has solved the problem for me.
As far as I can tell everything works as it should but I'm only using a single monitor.
Activity
[-]OS X: [/-][+]OS X: Window position after fullscreen[/+]Akemi commentedon Feb 22, 2017
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.
cocoa: only move window into screen bounds when changing screens
Akemi commentedon Feb 23, 2017
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.
cocoa: only move window into screen bounds when changing screens
mercutiodesign commentedon Feb 25, 2017
Thanks for your work! I used your branch and it has solved the problem for me.
As far as I can tell everything works as it should but I'm only using a single monitor.
cocoa: only move window into screen bounds when changing screens