Merge branch 'wip/sophie-h/scrolled-window-propagate-event' into 'main'

scrolledWindow: Propagate event for no scrolling

See merge request GNOME/gtk!5447
This commit is contained in:
Matthias Clasen 2023-01-27 14:54:33 +00:00
commit 6bfd581a72

View File

@ -1222,6 +1222,10 @@ captured_scroll_cb (GtkEventControllerScroll *scroll,
gtk_scrolled_window_cancel_deceleration (scrolled_window);
if (!may_hscroll (scrolled_window) &&
!may_vscroll (scrolled_window))
return GDK_EVENT_PROPAGATE;
if (priv->smooth_scroll)
{
scrolled_window_scroll (scrolled_window, delta_x, delta_y, scroll);
@ -1412,6 +1416,10 @@ scroll_controller_scroll (GtkEventControllerScroll *scroll,
GtkScrolledWindowPrivate *priv =
gtk_scrolled_window_get_instance_private (scrolled_window);
if (!may_hscroll (scrolled_window) &&
!may_vscroll (scrolled_window))
return GDK_EVENT_PROPAGATE;
if (!priv->smooth_scroll)
scrolled_window_scroll (scrolled_window, delta_x, delta_y, scroll);