summaryrefslogtreecommitdiff
path: root/gtk/gtkpathbar.c
diff options
context:
space:
mode:
authorErnestas Kulik <ernestask@gnome.org>2018-07-18 16:34:39 +0300
committerErnestas Kulik <ernestask@gnome.org>2018-07-18 16:36:18 +0300
commit3ebd1c3fe77809a80ff1d647ba2d368b5aea0623 (patch)
treeb2ca961755b63110be132fca51cd8ecc53d27084 /gtk/gtkpathbar.c
parent0750b4fd28eedf0782825e1b1f932b912c07c6c7 (diff)
downloadgtk+-scroll-event-propagation.tar.gz
eventcontrollerscroll: Conditionally propagate ::scrollscroll-event-propagation
Currently, gtk_event_controller_scroll_handle_event() always returns TRUE if it is handled, which stops the propagation of the event. If there’s a single GtkEventControllerScroll in the widget hierarchy, that means that no others will run, depending on the propagation phase. In Nautilus, this can be observed when adding a scroll controller to the GtkScrolledWindow (ctrl-scrolling controls the zoom level) - either the scrolling or the zooming breaks. Fixes https://gitlab.gnome.org/GNOME/gtk/issues/45
Diffstat (limited to 'gtk/gtkpathbar.c')
-rw-r--r--gtk/gtkpathbar.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index eeaf6e4326..33313979fd 100644
--- a/gtk/gtkpathbar.c
+++ b/gtk/gtkpathbar.c
@@ -157,10 +157,10 @@ static void gtk_path_bar_update_button_appearance (GtkPathBar *path_bar,
ButtonData *button_data,
gboolean current_dir);
-static void gtk_path_bar_scroll_controller_scroll (GtkEventControllerScroll *scroll,
- gdouble dx,
- gdouble dy,
- GtkPathBar *path_bar);
+static gboolean gtk_path_bar_scroll_controller_scroll (GtkEventControllerScroll *scroll,
+ gdouble dx,
+ gdouble dy,
+ GtkPathBar *path_bar);
static void
add_cancellable (GtkPathBar *path_bar,
@@ -728,7 +728,7 @@ gtk_path_bar_display_changed (GtkWidget *widget,
gtk_path_bar_check_icon_theme (GTK_PATH_BAR (widget));
}
-static void
+static gboolean
gtk_path_bar_scroll_controller_scroll (GtkEventControllerScroll *scroll,
gdouble dx,
gdouble dy,
@@ -738,6 +738,8 @@ gtk_path_bar_scroll_controller_scroll (GtkEventControllerScroll *scroll,
gtk_path_bar_scroll_down (path_bar);
else if (dy < 0)
gtk_path_bar_scroll_up (path_bar);
+
+ return TRUE;
}
static void