From: Luca Bacci Date: Fri, 7 Oct 2022 16:15:29 +0000 (+0200) Subject: GdkWin32: Fix resizes with native decorations X-Git-Tag: archive/raspbian/4.8.3+ds-2+rpi1~3^2~20^2^2~1^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=40ed5ed49496f462474a172f2486085e824f6098;p=gtk4.git GdkWin32: Fix resizes with native decorations Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5142 Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5088 Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5090 --- diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c index 492fa68c4b..02f34e43ec 100644 --- a/gdk/win32/gdkevents-win32.c +++ b/gdk/win32/gdkevents-win32.c @@ -2981,6 +2981,8 @@ gdk_event_translate (MSG *msg, } #endif + impl = GDK_WIN32_SURFACE (window); + /* Break grabs on unmap or minimize */ if (windowpos->flags & SWP_HIDEWINDOW || ((windowpos->flags & SWP_STATECHANGED) && IsIconic (msg->hwnd))) @@ -3041,9 +3043,18 @@ gdk_event_translate (MSG *msg, !(windowpos->flags & SWP_NOCLIENTSIZE) || (windowpos->flags & SWP_SHOWWINDOW)) { - if (!IsIconic (msg->hwnd) && - !GDK_SURFACE_DESTROYED (window)) - gdk_surface_request_layout (window); + if (!IsIconic (msg->hwnd) && !GDK_SURFACE_DESTROYED (window)) + { + if (!_gdk_win32_surface_lacks_wm_decorations (window) && + !(windowpos->flags & SWP_NOCLIENTSIZE) && + window->width == impl->next_layout.configured_width && + window->height == impl->next_layout.configured_height) + { + impl->inhibit_configure = TRUE; + } + + gdk_surface_request_layout (window); + } } if ((windowpos->flags & SWP_HIDEWINDOW) &&