mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-02-05 04:06:20 -05:00
The frame event groups separate pointer events together. The primary use-case for this at the moment is diagonal scrolling - a vertical/horizontal scroll event can be grouped together to calculate the correct motion vector. Frame events group all wl_pointer events. An example sequence of motion events followed by a diagonal scroll followed by a button event is: wl_pointer.motion wl_pointer.frame wl_pointer.motion wl_pointer.frame wl_pointer.axis wl_pointer.axis wl_pointer.frame wl_pointer.button wl_pointer.frame In the future, other extensions may insert additional information about an event into the frame. For example, an extension may add information about the physical device that generated an event into the frame. For this reason, enter/leave events are grouped by a frame event too. The axis_source event determines how an axis event was generated. That enables clients to judge when to use kinetic scrolling. Only one axis_source event is allowed per frame and applies to all events in this frame. The axis_stop event notifies a client about the termination of a scroll sequence, likewise needed to calculate kinetic scrolling parameters. Multiple axis_stop events within the same frame indicate that scrolling has stopped in all these axis at the same time. The axis_discrete event provides the wheel click count. Previously the axis value was some hardcoded number (10), with the discrete steps this enables a client to differ between line-based scrolling on a mouse wheel and smooth scrolling with a touchpad. The axis_discrete event carries the axis information and the discrete value and can occur at any time in the frame provided it is ordered before the matching axis event. Specifically, this sequence is valid: wl_pointer.axis_source wl_pointer.axis_discrete (vert) wl_pointer.axis_discrete (horiz) wl_pointer.axis (horiz) wl_pointer.axis (vert) wl_pointer.frame Enter and leave event also trigger wl_pointer.frame events, where possible the compositor should group leave and subsequent enter into the same frame. This indicates to the client that the pointer has moved between surfaces and may allow a client to shortcut code otherwise triggerd by the leave or enter events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| wayland.dtd | ||
| wayland.xml | ||