Skip to content

cocoa: Prevent spurious window resizes when moving between displays - #16514

Merged
Kontrabant merged 1 commit into
libsdl-org:mainfrom
Kontrabant:cocoa_settings
Oct 13, 2026
Merged

Kontrabant merged 1 commit into
libsdl-org:mainfrom
Kontrabant:cocoa_settings

Conversation

@Kontrabant

Copy link
Copy Markdown
Contributor

macOS 12 added a "feature" that will try to automatically resize windows when they are moved between differently sized displays. Set the undocumented app setting NSScreenLayoutAdjustOnWindowMove to NO to prevent windows from being spuriously resized when being moved between displays.

Thanks to @johnnovak for discovering this setting.

Fixes #16485

  • 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").

macOS 12 added a "feature" that will try to automatically resize windows when they are moved between differently sized displays. Set the undocumented app setting NSScreenLayoutAdjustOnWindowMove to NO to prevent windows from being spuriously resized when being moved between displays.

Thanks to @johnnovak for discovering this setting.
@Kontrabant
Kontrabant merged commit d5e971d into libsdl-org:main Oct 13, 2026
10 checks passed
@Kontrabant
Kontrabant deleted the cocoa_settings branch October 13, 2026 00:09
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.

macOS: windows resized with SDL_SetWindowSize() snap back to a stale size when dragged to another display

2 participants