mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 06:21:14 +00:00
scrolledWindow: Propagate event for no scrolling
This commit is contained in:
parent
30987168fb
commit
e62ca17f88
@ -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