Fix Cocoa_RaiseWindow activating the app when SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED is false
parent
c5bd2cba98
commit
d57249034a
|
@ -2196,13 +2196,13 @@ void Cocoa_RaiseWindow(SDL_VideoDevice *_this, SDL_Window *window)
|
||||||
*/
|
*/
|
||||||
[windowData.listener pauseVisibleObservation];
|
[windowData.listener pauseVisibleObservation];
|
||||||
if (![nswindow isMiniaturized] && [nswindow isVisible]) {
|
if (![nswindow isMiniaturized] && [nswindow isVisible]) {
|
||||||
[NSApp activateIgnoringOtherApps:YES];
|
|
||||||
if (SDL_WINDOW_IS_POPUP(window)) {
|
if (SDL_WINDOW_IS_POPUP(window)) {
|
||||||
NSWindow *nsparent = ((__bridge SDL_CocoaWindowData *)window->parent->driverdata).nswindow;
|
NSWindow *nsparent = ((__bridge SDL_CocoaWindowData *)window->parent->driverdata).nswindow;
|
||||||
[nsparent addChildWindow:nswindow ordered:NSWindowAbove];
|
[nsparent addChildWindow:nswindow ordered:NSWindowAbove];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bActivate) {
|
if (bActivate) {
|
||||||
|
[NSApp activateIgnoringOtherApps:YES];
|
||||||
[nswindow makeKeyAndOrderFront:nil];
|
[nswindow makeKeyAndOrderFront:nil];
|
||||||
} else {
|
} else {
|
||||||
[nswindow orderFront:nil];
|
[nswindow orderFront:nil];
|
||||||
|
|
Loading…
Reference in New Issue