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 10016 d565c0f35a92
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
--- a/src/video/x11/SDL_x11window.c	Mon Jan 04 23:44:27 2016 -0500
+++ b/src/video/x11/SDL_x11window.c	Tue Apr 21 01:22:32 2015 -0400
@@ -1108,6 +1108,12 @@
         }
     }
 
+    /* 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);
 }