forked from AuroraMiddleware/gtk
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:
commit
6bfd581a72
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user