From d35e1e78ea151e239689cf5028fe92737d42adbf Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Fri, 2 Jul 2021 15:05:33 +0800 Subject: [PATCH] gdksurface-win32.c: Disable AeroSnap for surface if not resizable AeroSnap essentially resizes the surface by all means, so if a surface is not resizable, just bail out of the operation, even though it is triggered by a move operation. This matches what is done in Windows. --- gdk/win32/gdksurface-win32.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c index 28ee285e44..fd8f9d0b8e 100644 --- a/gdk/win32/gdksurface-win32.c +++ b/gdk/win32/gdksurface-win32.c @@ -3045,6 +3045,14 @@ handle_aerosnap_move_resize (GdkSurface *surface, int halfright = 0; int fullup = 0; gboolean fullup_edge = FALSE; + GdkWin32Surface *impl = GDK_WIN32_SURFACE (surface); + + if (context->op == GDK_WIN32_DRAGOP_MOVE) + { + if (impl->toplevel_layout != NULL && + !gdk_toplevel_layout_get_resizable (impl->toplevel_layout)) + return; + } if (context->op == GDK_WIN32_DRAGOP_RESIZE) switch (context->edge)