Skip to content

Commit

Permalink
Mac: Fix returning to the window's Space in OS X 10.11+ when SDL_WIND…
Browse files Browse the repository at this point in the history
…OW_FULLSCREEN_DESKTOP is used (bug #3152.)
  • Loading branch information
slime73 committed Oct 23, 2015
1 parent 4c72d39 commit f8824cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/video/cocoa/SDL_cocoawindow.m
Expand Up @@ -1602,8 +1602,10 @@ - (void)resetCursorRects
}

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];
Expand Down

0 comments on commit f8824cb

Please sign in to comment.