doc: guarantee end sequence for continuous scroll
authorJosé Expósito <jose.exposito89@gmail.com>
Sun, 19 Sep 2021 19:23:41 +0000 (21:23 +0200)
committerJosé Expósito <jose.exposito89@gmail.com>
Sun, 19 Sep 2021 19:32:59 +0000 (21:32 +0200)
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 <jose.exposito89@gmail.com>
src/libinput.h

index e0a9df6..3a724b9 100644 (file)
@@ -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.
  *