Skip to content

Commit

Permalink
x11: Workaround window managers that mark fullscreen windows as maxim…
Browse files Browse the repository at this point in the history
…ized.

This patch came from Unreal Engine 4's fork of SDL, compliments of Epic Games.
  • Loading branch information
icculus committed Apr 21, 2015
1 parent 81209ac commit 9a75279
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/video/x11/SDL_x11window.c
Expand Up @@ -1108,6 +1108,12 @@ X11_SetWindowFullscreenViaWM(_THIS, SDL_Window * window, SDL_VideoDisplay * _dis
}
}

/* Fullscreen windows sometimes end up being marked maximized by
window managers. Force it back to how we expect it to be. */
if (!fullscreen && (window->flags & SDL_WINDOW_MAXIMIZED) == 0) {
SetWindowMaximized(_this, window, SDL_FALSE);
}

X11_XFlush(display);
}

Expand Down

0 comments on commit 9a75279

Please sign in to comment.