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.
This commit is contained in:
Chun-wei Fan
2021-07-02 15:05:33 +08:00
parent 9cf31641a5
commit d35e1e78ea

View File

@@ -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)