[gtk/disable-aerosnap-if-not-resizable: 300/300] gdksurface-win32.c: Disable AeroSnap for surface if not resizable
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/disable-aerosnap-if-not-resizable: 300/300] gdksurface-win32.c: Disable AeroSnap for surface if not resizable
- Date: Fri, 6 Aug 2021 10:00:20 +0000 (UTC)
commit 00e0643be6d2b484820ff7786cfea2ab7ef00c12
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Jul 2 15:05:33 2021 +0800
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 other Windows applications.
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 4c1f7c1a3f..fa1d1ffa83 100644
--- a/gdk/win32/gdksurface-win32.c
+++ b/gdk/win32/gdksurface-win32.c
@@ -3217,6 +3217,14 @@ handle_aerosnap_move_resize (GdkSurface *window,
int halfright = 0;
int fullup = 0;
gboolean fullup_edge = FALSE;
+ GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
+
+ 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]