Просмотр исходного кода

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.
Ryan C. Gordon 11 лет назад
Родитель
Сommit
9a7527988a
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      src/video/x11/SDL_x11window.c

+ 6 - 0
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);
     X11_XFlush(display);
 }
 }