From 66120cff4b4d9685a093bba7f201a1c025aadcf9 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 29 May 2020 19:39:15 -0400 Subject: [PATCH 1/2] eventcontroller: Fix crossing event scopes We want to deliver crossing events to controllers with scope same-native as long as at least one of the targets is on the same native. As a new approach, treat out-of-scope targets like NULL, and deliver crossing events as long as one of the targets is not NULL. --- gtk/gtkeventcontroller.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/gtk/gtkeventcontroller.c b/gtk/gtkeventcontroller.c index c513ea093d..432990ed91 100644 --- a/gtk/gtkeventcontroller.c +++ b/gtk/gtkeventcontroller.c @@ -289,15 +289,28 @@ gtk_event_controller_filter_crossing (GtkEventController *controller, const GtkCrossingData *data) { GtkEventControllerPrivate *priv; + GtkWidget *old_target, *new_target; priv = gtk_event_controller_get_instance_private (controller); if (priv->widget && !gtk_widget_is_sensitive (priv->widget)) return TRUE; - if (priv->limit == GTK_LIMIT_SAME_NATIVE && - (!same_native (priv->widget, data->old_target) || - !same_native (priv->widget, data->new_target))) + old_target = data->old_target; + new_target = data->new_target; + + if (priv->limit == GTK_LIMIT_SAME_NATIVE) + { + /* treat out-of-scope targets like NULL */ + + if (!same_native (priv->widget, old_target)) + old_target = NULL; + + if (!same_native (priv->widget, new_target)) + new_target = NULL; + } + + if (old_target == NULL && new_target == NULL) return TRUE; return FALSE; From 821a458393a6f43589428e2891545ecfa7ba2919 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 30 May 2020 08:55:21 -0400 Subject: [PATCH 2/2] Revert "Bump the pango dependency" This reverts commit 98df0be43dea6ff61aadb28e1823b11a6d53452a. It broke the win32 build. --- meson.build | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index fc0b1ef7fc..486ea08672 100644 --- a/meson.build +++ b/meson.build @@ -27,7 +27,7 @@ else endif glib_req = '>= @0@.@1@.@2@'.format(glib_major_req, glib_minor_req, glib_micro_req) -pango_req = '>= 1.45.0' +pango_req = '>= 1.44.4' fribidi_req = '>= 0.19.7' atk_req = '>= 2.15.1' cairo_req = '>= 1.14.0' @@ -352,11 +352,10 @@ fribidi_dep = dependency('fribidi', version: fribidi_req, # Require PangoFT2 if on X11 or wayland require_pangoft2 = wayland_enabled or x11_enabled +pangoft_dep = dependency('pangoft2', required: false) if require_pangoft2 pangoft_dep = dependency('pangoft2', fallback : ['pango', 'libpangoft2_dep']) -else - pangoft_dep = dependency('pangoft2', required: false) endif if win32_enabled