Skip to content

Add scroll speed settings

panoplie requested to merge panoplie/gtk:scroll-speed into main

GdkScrollEvent reports raw scroll events from mouse wheels, 2-fingers touchpad motions, trackpoint scroll motions... Scroll events have different use cases. The most common one is to move content on screen. But they can also be used to switch weapon on a video-game, itterate values in a combo box or a number picker, zoom on a picture... Users ask for a way to configure the scroll speed. It only concerns the first most-common use case.

This MR adds 3 new GtkSettings keys to control the scrolling speed on each scroll device: mouse, touchpad and trackpoint. It also implement these settings in GtkScrolledWindow. To determine the device where the scroll event come from, we look at the GdkScrollUnit of the event. We need a new unit to distinguish the trackpoint case. That's why I have added a new GDK_SCROLL_UNIT_CONTINUOUS enum. I have modified the GdkScrollUnit docs to precisely explain the meaning of each GdkScrollUnit enum.

Edited by panoplie

Merge request reports