x11: Don't mess with fullscreen vs maximized window state on unmapped windows.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 20 Feb 2016 00:44:42 -0500
changeset 10083 a0a0283d0954
parent 10082 e1e10dfb04ad
child 10084 3bd08d2d45b0
x11: Don't mess with fullscreen vs maximized window state on unmapped windows.
src/video/x11/SDL_x11window.c
--- a/src/video/x11/SDL_x11window.c	Fri Feb 19 00:28:53 2016 -0500
+++ b/src/video/x11/SDL_x11window.c	Sat Feb 20 00:44:42 2016 -0500
@@ -1208,8 +1208,10 @@
 
     /* 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);
+    if (X11_IsWindowMapped(_this, window)) {
+        if (!fullscreen && ((window->flags & SDL_WINDOW_MAXIMIZED) == 0)) {
+            SetWindowMaximized(_this, window, SDL_FALSE);
+        }
     }
 
     X11_XFlush(display);