Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/bockbuild.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Köplinger <alex.koeplinger@outlook.com>2018-06-15 19:57:13 +0300
committerGitHub <noreply@github.com>2018-06-15 19:57:13 +0300
commit3737ca0ec8ac23bbe8b6cbc30a1da0797e977f78 (patch)
treea9be087bca630735b0eae996f0c3fafc46b84685
parent6d2d89b690fa96bf993b4bd4be22880a96965504 (diff)
parentefb38cf276d58c5265d1321df32b77b0f6a7afb0 (diff)
Merge pull request #66 from mono/gtk-fix-find_nsview_at_pos
Gtk fix find nsview at pos
-rw-r--r--packages/gtk+.py4
-rw-r--r--packages/patches/gtk/gtk-fix-find_nsview_at_pos-recursive.patch34
2 files changed, 37 insertions, 1 deletions
diff --git a/packages/gtk+.py b/packages/gtk+.py
index 88a138f..4e3ced2 100644
--- a/packages/gtk+.py
+++ b/packages/gtk+.py
@@ -208,7 +208,9 @@ class GtkPackage (GitHubPackage):
# https://developercommunity.visualstudio.com/content/problem/104471/visual-studio-for-mac-720540-cannot-launch-exc-bre.html
'patches/gtk/update_only_apple_keyboard_layout.patch',
- 'patches/gtk/gtk-backing-scale-factor.patch'
+ 'patches/gtk/gtk-backing-scale-factor.patch',
+
+ 'patches/gtk/gtk-fix-find_nsview_at_pos-recursive.patch'
])
def prep(self):
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
new file mode 100644
index 0000000..20c72fc
--- /dev/null
+++ b/packages/patches/gtk/gtk-fix-find_nsview_at_pos-recursive.patch
@@ -0,0 +1,34 @@
+diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
+index 195899b13b..67e3f8ee17 100644
+--- a/gdk/quartz/gdkevents-quartz.c
++++ b/gdk/quartz/gdkevents-quartz.c
+@@ -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);
++ 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);