After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 753495 - Kinetic scrolling events still reach the GtkScrolledWindow
Kinetic scrolling events still reach the GtkScrolledWindow
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkScrolledWindow
3.17.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-08-11 08:09 UTC by Timm Bäder
Modified: 2015-08-19 20:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtkscrolledwindow: Fold kinetic deceleration handling into scroll_event() (4.45 KB, patch)
2015-08-19 17:10 UTC, Carlos Garnacho
committed Details | Review

Description Timm Bäder 2015-08-11 08:09:04 UTC
If you use libinput, X AND implement the scroll_event handler to just return GDK_EVENT_STOP (for example) and put that widget into a GtkScrolledWindow, the normal scroll events won't reach the GtkScrolleWindow, but the kinetic scrolling events will.
Comment 1 Carlos Garnacho 2015-08-19 17:10:24 UTC
Created attachment 309620 [details] [review]
gtkscrolledwindow: Fold kinetic deceleration handling into scroll_event()

In order to play along with child widgets that use scroll events for anything
else than scrolling, it will be better to do this in the bubble phase, so
the child widget has an opportunity to GDK_EVENT_STOP the event before we
trigger kinetic scrolling.

This of course won't work for widgets that choose to reimplement scroll event
handling themselves, they should be smart at resorting to GtkScrolledWindow's
scroll event handling.

This fixes kinetic scrolling kicking in too pervasively on widgets that eg.
implement zoom on scroll events.
Comment 2 Matthias Clasen 2015-08-19 18:12:11 UTC
Review of attachment 309620 [details] [review]:

makes sense to me
Comment 3 Carlos Garnacho 2015-08-19 20:05:04 UTC
git bz went somewhat silent here. This is now on master.