cocoa: Toggle the fullscreen menu item to 'leave' when entering a fullscreen space

Only return 'NO' during the menu item validation if the window is fullscreen and not in a fullscreen space.
This commit is contained in:
Frank Praznik committed 2024-12-09 23:43:31 -05:00
1 parent 48b6b93fb6
commit d4225070ad
1 file changed
+4 -1
+4 -1
View File
@@ -108,7 +108,10 @@
SDL_Window *window = [self findSDLWindow];
if (window == NULL) {
return NO;
} else if (window->flags & SDL_WINDOW_FULLSCREEN) {
}
SDL_CocoaWindowData *data = (__bridge SDL_CocoaWindowData *)window->internal;
if (window->flags & SDL_WINDOW_FULLSCREEN && ![data.listener isInFullscreenSpace]) {
return NO;
} else if ((window->flags & SDL_WINDOW_RESIZABLE) == 0) {
return NO;