From 285ebd58a87b3ef04623b199774fd5d42c5569be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Sun, 11 Dec 2016 16:26:34 +0000 Subject: GDK W32: Handle maximizing correctly for small primary monitors When primary monitor is smaller than the actual monitor on which the window is being maximized, the WM will do widnow size adjustments that will completely screw the window size if we try to make it smaller than 100% fullscreen (to account for taskbar size, for example). Fix this by overriding maximized window size during WM_WINDOWPOSCHANGING. https://bugzilla.gnome.org/show_bug.cgi?id=775808 --- gdk/win32/gdkwindow-win32.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdk/win32/gdkwindow-win32.c') diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c index 9f62065ca5..2c4a4ee6ab 100644 --- a/gdk/win32/gdkwindow-win32.c +++ b/gdk/win32/gdkwindow-win32.c @@ -5677,6 +5677,10 @@ GtkShowWindow (GdkWindow *window, break; } + /* Ensure that maximized window size is corrected later on */ + if (cmd_show == SW_MAXIMIZE) + impl->maximizing = TRUE; + return ShowWindow (hwnd, cmd_show); } -- cgit v1.2.1