[gtk/wip/chergert/for-4-6: 43/56] macos: drop enter/exit when in manual drag/resize
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/for-4-6: 43/56] macos: drop enter/exit when in manual drag/resize
- Date: Wed, 16 Mar 2022 19:25:45 +0000 (UTC)
commit 659832ccab1bfab984807454f50e927aeda41666
Author: Christian Hergert <christian hergert me>
Date: Wed Mar 9 13:20:53 2022 -0800
macos: drop enter/exit when in manual drag/resize
If we are in a manual resize/drag then we don't want to generate crossing
events as they can just confuse things.
gdk/macos/gdkmacosdisplay-translate.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gdk/macos/gdkmacosdisplay-translate.c b/gdk/macos/gdkmacosdisplay-translate.c
index e3fb03fea5..fe4701c39d 100644
--- a/gdk/macos/gdkmacosdisplay-translate.c
+++ b/gdk/macos/gdkmacosdisplay-translate.c
@@ -1200,7 +1200,11 @@ _gdk_macos_display_translate (GdkMacosDisplay *self,
GdkDevice *pointer = gdk_seat_get_pointer (seat);
GdkDeviceGrabInfo *grab = _gdk_display_get_last_device_grab (GDK_DISPLAY (self), pointer);
- if (grab == NULL)
+ if ([(GdkMacosWindow *)window isInManualResizeOrMove])
+ {
+ ret = GDK_MACOS_EVENT_DROP;
+ }
+ else if (grab == NULL)
{
if (event_type == NSEventTypeMouseExited)
[[NSCursor arrowCursor] set];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]