From d57249034aacb0a6e9bbb408ae950fbc51894267 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 6 Jul 2023 18:14:37 -0700 Subject: [PATCH] Fix Cocoa_RaiseWindow activating the app when SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED is false --- src/video/cocoa/SDL_cocoawindow.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index 77db1e895..5631360ab 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -2196,13 +2196,13 @@ void Cocoa_RaiseWindow(SDL_VideoDevice *_this, SDL_Window *window) */ [windowData.listener pauseVisibleObservation]; if (![nswindow isMiniaturized] && [nswindow isVisible]) { - [NSApp activateIgnoringOtherApps:YES]; if (SDL_WINDOW_IS_POPUP(window)) { NSWindow *nsparent = ((__bridge SDL_CocoaWindowData *)window->parent->driverdata).nswindow; [nsparent addChildWindow:nswindow ordered:NSWindowAbove]; } if (bActivate) { + [NSApp activateIgnoringOtherApps:YES]; [nswindow makeKeyAndOrderFront:nil]; } else { [nswindow orderFront:nil];