[RFC PATCH wayland] protocol: add wl_pointer.axis_frame events

Peter Hutterer peter.hutterer at who-t.net
Wed Jun 3 21:41:52 PDT 2015


To group separate vertical/horizontal scroll events together. Likewise it
enables axis_stop events to be grouped so that the final vector for kinetic
scrolling may be calculated correctly.

Multiple scroll sources within the same frame is not expected, but the
protocol allows this use-case, i.e. axis_frame events are not deliniators for
axis_source switches.
---
This is on top of the other patch, I kept it separate for simpler review.

Cheers,
   Peter

 protocol/wayland.xml | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index db6753a..aad238b 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -1573,6 +1573,30 @@
     </request>
 
     <!-- Version 5 additions -->
+    <event name="axis_frame" since="5">
+      <description summary="end of axis set event">
+	Indicates the end of a set of wl_pointer.axis events that logically
+        belong together.
+
+        All wl_pointer.axis events or wl_pointer.axis_stop events sent
+        before a wl_pointer.axis_frame event belong logically together. For
+        example, in a diagonal scroll motion the compositor will send two
+        wl_pointer.axis events (horizontal and vertical) followed by a
+        wl_pointer.axis_frame event. The client may use this information to
+        calculate a diagonal vector for scrolling.
+
+        When multiple wl_pointer.axis events occur within the same frame,
+        the motion vector is the combined motion of all events.
+        When a wl_pointer.axis and a wl_pointer.axis_stop event occur within
+        the same frame, this indicates that axis movement in one axis has
+        stopped but continues in the other axis.
+        When multiple wl_pointer.axis_stop events occur within in the same
+        frame, this indicates that these axes stopped in the same instance.
+
+        wl_pointer.axis_frame may logically group events from multiple
+        different wl_pointer.axis_sources.
+      </description>
+    </event>
 
     <enum name="axis_source">
       <description summary="axis source types">
-- 
2.4.1



More information about the wayland-devel mailing list