linux-packaging-mono/external/bockbuild/packages/patches/gtk/combobox-crossing-events.patch
Xamarin Public Jenkins (auto-signing) 6bdd276d05 Imported Upstream version 5.0.0.42
Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
2017-04-10 11:41:01 +00:00

45 lines
1.4 KiB
Diff

diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
index 9e57edd..e8c28ad 100644
--- a/gdk/quartz/gdkevents-quartz.c
+++ b/gdk/quartz/gdkevents-quartz.c
@@ -46,6 +46,8 @@
/* This is the window corresponding to the key window */
static GdkWindow *current_keyboard_window;
+static GdkWindow *crossing_current_window = NULL;
+
/* This is the event mask from the last event */
static GdkEventMask current_event_mask;
@@ -1129,12 +1131,18 @@ synthesize_crossing_event (GdkWindow *window,
if (!(private->event_mask & GDK_ENTER_NOTIFY_MASK))
return FALSE;
+ if (crossing_current_window == window)
+ return FALSE;
+
fill_crossing_event (window, event, nsevent,
x, y,
x_root, y_root,
GDK_ENTER_NOTIFY,
GDK_CROSSING_NORMAL,
GDK_NOTIFY_NONLINEAR);
+
+ crossing_current_window = window;
+
return TRUE;
case NSMouseExited:
@@ -1142,6 +1150,11 @@ synthesize_crossing_event (GdkWindow *window,
if (!(private->event_mask & GDK_LEAVE_NOTIFY_MASK))
return FALSE;
+ if (crossing_current_window != NULL && crossing_current_window != window)
+ return FALSE;
+
+ crossing_current_window = NULL;
+
fill_crossing_event (window, event, nsevent,
x, y,
x_root, y_root,