summaryrefslogtreecommitdiff
path: root/gtk/gtkscrolledwindow.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/gtkscrolledwindow.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/gtkscrolledwindow.c')
-rw-r--r--gtk/gtkscrolledwindow.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 4c502846ae..7bee752377 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -1279,7 +1279,7 @@ scroll_controller_scroll_begin (GtkEventControllerScroll *scroll,
priv->smooth_scroll = TRUE;
}
-static void
+static gboolean
scroll_controller_scroll (GtkEventControllerScroll *scroll,
gdouble delta_x,
gdouble delta_y,
@@ -1290,7 +1290,7 @@ scroll_controller_scroll (GtkEventControllerScroll *scroll,
GdkModifierType state;
if (!gtk_get_current_event_state (&state))
- return;
+ return FALSE;
shifted = (state & GDK_SHIFT_MASK) != 0;
@@ -1349,6 +1349,8 @@ scroll_controller_scroll (GtkEventControllerScroll *scroll,
g_source_set_name_by_id (priv->scroll_events_overshoot_id,
"[gtk+] start_scroll_deceleration_cb");
}
+
+ return TRUE;
}
static void