33 lines
1.3 KiB
Diff
33 lines
1.3 KiB
Diff
|
commit 291c4626867885c74aa3a544eb9f74cd974895a0
|
||
|
Author: Cody Russell <cody@jhu.edu>
|
||
|
Date: Wed Jan 14 14:56:34 2015 -0600
|
||
|
|
||
|
When determining if the event is destined for an NSView outside our
|
||
|
view hierarchy, we can't just check if it's not a gtkview, we need to
|
||
|
also ensure that none of its superviews are gtkviews.
|
||
|
|
||
|
diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
|
||
|
index 31c5d33..183537f 100644
|
||
|
--- a/gdk/quartz/gdkevents-quartz.c
|
||
|
+++ b/gdk/quartz/gdkevents-quartz.c
|
||
|
@@ -1823,7 +1823,18 @@ gdk_event_translate (GdkEvent *event,
|
||
|
GdkQuartzWindow *nswindow = ((GdkWindowImplQuartz *)private->impl)->toplevel;
|
||
|
GdkQuartzView *nsview = ((GdkWindowImplQuartz *)private->impl)->view;
|
||
|
|
||
|
- if (![[nswindow firstResponder] respondsToSelector:@selector(isGtkView)])
|
||
|
+ NSView *tmp_view = [nswindow firstResponder];
|
||
|
+ gboolean gtk_child = FALSE;
|
||
|
+
|
||
|
+ while (tmp_view != NULL)
|
||
|
+ {
|
||
|
+ if (tmp_view && [tmp_view respondsToSelector:@selector(isGtkView)])
|
||
|
+ gtk_child = TRUE;
|
||
|
+
|
||
|
+ tmp_view = [tmp_view superview];
|
||
|
+ }
|
||
|
+
|
||
|
+ if (!gtk_child && ![[nswindow firstResponder] respondsToSelector:@selector(isGtkView)])
|
||
|
{
|
||
|
return_val = FALSE;
|
||
|
break;
|