mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-19 22:10:52 +00:00
cocoa: Fix Cocoa_RaiseWindow not making child window key if SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED is true
- We intentionally don't raise the application when raising a child window to allow raising a child window to the top without setting the application active but the child window should still be set as key window for the application if desired.
This commit is contained in:
@@ -2360,6 +2360,9 @@ void Cocoa_RaiseWindow(SDL_VideoDevice *_this, SDL_Window *window)
|
||||
if (SDL_WINDOW_IS_POPUP(window)) {
|
||||
NSWindow *nsparent = ((__bridge SDL_CocoaWindowData *)window->parent->driverdata).nswindow;
|
||||
[nsparent addChildWindow:nswindow ordered:NSWindowAbove];
|
||||
if (bActivate) {
|
||||
[nswindow makeKeyWindow];
|
||||
}
|
||||
} else {
|
||||
if (bActivate) {
|
||||
[NSApp activateIgnoringOtherApps:YES];
|
||||
|
||||
Reference in New Issue
Block a user