diff options
author | Cody Russell <cody@jhu.edu> | 2018-05-30 17:30:55 +0300 |
---|---|---|
committer | Cody Russell <cody@jhu.edu> | 2018-05-30 17:30:55 +0300 |
commit | c6c49d40f57d135e5d591253fd72e7d261d76c64 (patch) | |
tree | 4ab8e08a9b1446b14be630d32423e6cf60350f71 /packages | |
parent | 8913e396e20aab98b8a6af4fa94a2617453926ca (diff) |
Another fix for find_nsview_at_pos()
Diffstat (limited to 'packages')
-rw-r--r-- | packages/patches/gtk/gtk-fix-find_nsview_at_pos-recursive.patch | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/packages/patches/gtk/gtk-fix-find_nsview_at_pos-recursive.patch b/packages/patches/gtk/gtk-fix-find_nsview_at_pos-recursive.patch index ef090fa..20c72fc 100644 --- a/packages/patches/gtk/gtk-fix-find_nsview_at_pos-recursive.patch +++ b/packages/patches/gtk/gtk-fix-find_nsview_at_pos-recursive.patch @@ -1,13 +1,34 @@ diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c -index 195899b13b..844128e0b2 100644 +index 195899b13b..67e3f8ee17 100644 --- a/gdk/quartz/gdkevents-quartz.c +++ b/gdk/quartz/gdkevents-quartz.c -@@ -748,7 +748,7 @@ find_nsview_at_pos (GdkWindowImplQuartz *impl, gint x, gint y) +@@ -729,7 +729,7 @@ _gdk_quartz_events_send_map_event (GdkWindow *window) + } + + static NSView * +-find_nsview_at_pos (GdkWindowImplQuartz *impl, gint x, gint y) ++find_nsview_at_pos (GdkWindowImplQuartz *impl, gint x, gint y, bool dont_recurse) + { + NSView *view = impl->view; + guint n_subviews; +@@ -748,7 +748,10 @@ find_nsview_at_pos (GdkWindowImplQuartz *impl, gint x, gint y) if (r.origin.x <= x && r.origin.x + r.size.width >= x && r.origin.y <= y && r.origin.y + r.size.height >= y) { - NSView* child = find_nsview_at_pos (impl, x - r.origin.x, y - r.origin.y); -+ NSView* child = find_nsview_at_pos (sv, x - r.origin.x, y - r.origin.y); ++ if (dont_recurse) ++ return sv; ++ ++ NSView* child = find_nsview_at_pos (impl, x - r.origin.x, y - r.origin.y, TRUE); if (child != NULL) return child; else +@@ -932,7 +935,7 @@ find_window_for_ns_event (NSEvent *nsevent, + toplevel_private = (GdkWindowObject *)toplevel; + toplevel_impl = (GdkWindowImplQuartz *)toplevel_private->impl; + +- subview = find_nsview_at_pos (toplevel_impl, *x, *y); ++ subview = find_nsview_at_pos (toplevel_impl, *x, *y, FALSE); + if (subview != NULL && ![subview isKindOfClass:[GdkQuartzView class]]) { + g_signal_emit_by_name (toplevel, "native-child-event", + subview, nsevent); |