From 9a7527988aaecb523fb7f8604dbbd12e6bbe4850 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 21 Apr 2015 01:22:32 -0400 Subject: [PATCH] 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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c index 76dc08847..93f6795b2 100644 --- a/src/video/x11/SDL_x11window.c +++ b/src/video/x11/SDL_x11window.c @@ -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); }