summaryrefslogtreecommitdiff
path: root/gdk/win32/gdkwindow-win32.c
diff options
context:
space:
mode:
authorРуслан Ижбулатов <lrn1986@gmail.com>2016-12-11 16:26:34 +0000
committerРуслан Ижбулатов <lrn1986@gmail.com>2017-12-02 10:38:17 +0000
commit285ebd58a87b3ef04623b199774fd5d42c5569be (patch)
tree86b3ec8d1f7862fae01f546330c601399ddb76f5 /gdk/win32/gdkwindow-win32.c
parentc7bdf643c5564e7b3cc21c2dfc86e4c889839cdf (diff)
downloadgtk+-285ebd58a87b3ef04623b199774fd5d42c5569be.tar.gz
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
Diffstat (limited to 'gdk/win32/gdkwindow-win32.c')
-rw-r--r--gdk/win32/gdkwindow-win32.c4
1 files changed, 4 insertions, 0 deletions
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);
}