From 5f966dc6c67194d2eaba250cea9832bbb017e565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= Date: Sun, 19 Sep 2021 21:23:41 +0200 Subject: doc: guarantee end sequence for continuous scroll MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GTK handles LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS as GDK_SCROLL_SMOOTH, the same event type that is used to handle LIBINPUT_EVENT_POINTER_SCROLL_FINGER. Because Mutter and other compositors, like wlroots based compositors, translate libinput terminating event to axis_stop instead of doing their own emulation, if libinput stops sending terminating events, it will cause client bugs. Since libinput always sends the terminating event for trackpoints and button scrolling and there are even tests in place to check for them, update the documentation to guarantee the terminating scroll sequence. Signed-off-by: José Expósito --- src/libinput.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libinput.h b/src/libinput.h index e0a9df67..3a724b9a 100644 --- a/src/libinput.h +++ b/src/libinput.h @@ -1561,8 +1561,8 @@ libinput_event_pointer_get_axis_value(struct libinput_event_pointer *event, * libinput_event_pointer_get_scroll_value_v120() for a simpler API of * handling scroll wheel events of different step sizes. * - * If the source is @ref LIBINPUT_POINTER_AXIS_SOURCE_CONTINUOUS, no - * terminating event is guaranteed (though it may happen). + * If the source is @ref LIBINPUT_POINTER_AXIS_SOURCE_CONTINUOUS, libinput + * guarantees that a scroll sequence is terminated with a scroll value of 0. * The coordinate system is identical to the cursor movement, i.e. a * scroll value of 1 represents the equivalent relative motion of 1. * @@ -1642,8 +1642,8 @@ libinput_event_pointer_get_axis_value_discrete(struct libinput_event_pointer *ev * libinput_event_pointer_get_scroll_value_v120() for a simpler API of * handling scroll wheel events of different step sizes. * - * If the event is @ref LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS, no - * terminating event is guaranteed (though it may happen). + * If the event is @ref LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS, libinput + * guarantees that a scroll sequence is terminated with a scroll value of 0. * The coordinate system is identical to the cursor movement, i.e. a * scroll value of 1 represents the equivalent relative motion of 1. * -- cgit v1.2.1