From a4627c5edacf91b8b8954652689c69f2c59df5c3 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sat, 20 Feb 2016 00:44:42 -0500 Subject: [PATCH] x11: Don't mess with fullscreen vs maximized window state on unmapped windows. --- src/video/x11/SDL_x11window.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c index d798ab26e..bb1b4bfb5 100644 --- a/src/video/x11/SDL_x11window.c +++ b/src/video/x11/SDL_x11window.c @@ -1208,8 +1208,10 @@ 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); + if (X11_IsWindowMapped(_this, window)) { + if (!fullscreen && ((window->flags & SDL_WINDOW_MAXIMIZED) == 0)) { + SetWindowMaximized(_this, window, SDL_FALSE); + } } X11_XFlush(display);