On 16 November 2015 at 00:57, Peter Hutterer <peter.hutte...@who-t.net> wrote: > 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. > > We can't extend the existing wl_pointer.axis events so we introduce a new > concept: latching events. These events (currently only axis_discrete) > are prefixed before a wl_pointer.axis event. A client must build the full > state of the event until the respective top-level event arrives. > i.e. a single event frame for a diagonal scroll with discrete information may > be: > > wl_pointer.axis_source > wl_pointer.axis_discrete > wl_pointer.axis > wl_pointer.axis_discrete > wl_pointer.axis > wl_pointer.frame > > Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> > Reviewed-by: Carlos Garnacho <carl...@gnome.org>
Good stuff. Reviewed-by: Daniel Stone <dani...@collabora.com> Cheers, Daniel _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel