Skip to content

cocoa: Workaround for an issue with incorrect window position after exiting fullscreen#15921

Open
ZeroEightSix wants to merge 1 commit into
libsdl-org:mainfrom
ZeroEightSix:patch-1
Open

cocoa: Workaround for an issue with incorrect window position after exiting fullscreen#15921
ZeroEightSix wants to merge 1 commit into
libsdl-org:mainfrom
ZeroEightSix:patch-1

Conversation

@ZeroEightSix

@ZeroEightSix ZeroEightSix commented Jul 2, 2026

Copy link
Copy Markdown
  • I confirm that I am the author of this code and release it to the SDL project under the Zlib license. This contribution does not contain code from other sources, including code generated by a Large Language Model ("AI").

On macOS, in some cases, the window can move to an incorrect position after exiting fullscreen

Description

In some cases the [NSMenu setMenuBarVisible:YES]; call in windowDidExitFullScreen: makes Cocoa call windowDidMove: with an incorrectly set window frame. [nswindow frame] in windowDidExitFullScreen: right before that setMenuBarVisible: call is correct.

Calling [NSMenu setMenuBarVisible:YES] in windowDidExitFullScreen: only if [NSMenu menuBarVisible] is false works around this problem.

Existing Issue(s)

#15920

@slouken slouken added this to the 3.4.14 milestone Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants