Kinetic scrolling in GtkScrolledWindow should be cancelled when setting its adjustment's value
Steps to reproduce
- Start scrolling a GtkScrolledWindow with a kinetic device (touchscreen, trackpad, etc)
- Call
gtk_adjustment_set_value()
or similar on the GtkScrolledWindow's adjustment while the scroll gesture still has some momentum, i.e. while the overlay scrollbars are still visible
Current behavior
The child widget is scrolled to the requested position, then jumps and keeps on scrolling as the kinetic scroll kicks back in again.
Expected outcome
The child widget is scrolled to the requested position, and stays there.
Version information
GTK+ 3.22.29 (Ubuntu package: 3.22.29-3ubuntu1)
Additional information
A work around is to call gtk_scrolled_window_set_kinetic_scrolling(false)
, then set the adjustement's value, then call gtk_scrolled_window_set_kinetic_scrolling(true)
again.
This was noticed when trying to track down why scrolling to a newly inserted row in GtkListBox was sometimes not being scrolled to for Geary Bug 778027.
Edited by Michael Gratton