mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
Mac: Fix returning to the window's Space in OS X 10.11+ when SDL_WINDOW_FULLSCREEN_DESKTOP is used (bug #3152.)
This commit is contained in:
parent
4c72d39ce7
commit
f8824cb99b
@ -1602,8 +1602,10 @@ Cocoa_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
|
||||
}
|
||||
|
||||
if ( data && (window->flags & SDL_WINDOW_FULLSCREEN) ) {
|
||||
if (SDL_ShouldAllowTopmost() && (window->flags & SDL_WINDOW_INPUT_FOCUS)) {
|
||||
if (SDL_ShouldAllowTopmost() && (window->flags & SDL_WINDOW_INPUT_FOCUS)
|
||||
&& ![data->listener isInFullscreenSpace]) {
|
||||
/* OpenGL is rendering to the window, so make it visible! */
|
||||
/* Doing this in 10.11 while in a Space breaks things (bug #3152) */
|
||||
[data->nswindow setLevel:CGShieldingWindowLevel()];
|
||||
} else {
|
||||
[data->nswindow setLevel:kCGNormalWindowLevel];
|
||||
|
Loading…
Reference in New Issue
Block a user