x11: Workaround window managers that mark fullscreen windows as maximized.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 21 Apr 2015 01:22:32 -0400
changeset 10016d565c0f35a92
parent 10015 d809627808b1
child 10017 363c41b866cd
x11: Workaround window managers that mark fullscreen windows as maximized.

This patch came from Unreal Engine 4's fork of SDL, compliments of Epic Games.
src/video/x11/SDL_x11window.c
     1.1 --- a/src/video/x11/SDL_x11window.c	Mon Jan 04 23:44:27 2016 -0500
     1.2 +++ b/src/video/x11/SDL_x11window.c	Tue Apr 21 01:22:32 2015 -0400
     1.3 @@ -1108,6 +1108,12 @@
     1.4          }
     1.5      }
     1.6  
     1.7 +    /* Fullscreen windows sometimes end up being marked maximized by
     1.8 +        window managers. Force it back to how we expect it to be. */
     1.9 +    if (!fullscreen && (window->flags & SDL_WINDOW_MAXIMIZED) == 0) {
    1.10 +        SetWindowMaximized(_this, window, SDL_FALSE);
    1.11 +    }
    1.12 +
    1.13      X11_XFlush(display);
    1.14  }
    1.15