linux-packaging-mono/external/bockbuild/packages/patches/gtk/combobox-crossing-events.patch

45 lines
1.4 KiB
Diff
Raw Normal View History

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,