<p dir="ltr">Oh, I apologize. I must have accidentally made a mistake while rebasing. Let me try this again. Please disregard this patch. </p>
<br><div class="gmail_quote"><div dir="ltr">On Thu, Apr 14, 2016, 8:04 PM Yong Bakos <<a href="mailto:junk@humanoriented.com">junk@humanoriented.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Apr 14, 2016, at 3:23 PM, Dennis Kempin <<a href="mailto:denniskempin@google.com" target="_blank">denniskempin@google.com</a>> wrote:<br>
><br>
> This CL updates the wl_touch interface with a shape and<br>
> orientation event.<br>
> The shape/orientation of a touch point is not relevant for most UI<br>
> applications, but allows a better experience in some cases<br>
> such as drawing apps.<br>
><br>
> The events are used by the compositor to inform the client<br>
> about changes in the shape and orientation of a touchpoint, which is<br>
> approximated by an ellipse and it's angle to the y-axis.<br>
><br>
> The event is optional and only sent when compositor and the<br>
> touch device support this type of information. The client is<br>
> responsible for making a reasonable assumption about the<br>
> touch shape if no shape is reported.<br>
><br>
> Signed-off-by: Dennis Kempin <<a href="mailto:denniskempin@google.com" target="_blank">denniskempin@google.com</a>><br>
<br>
Hi Dennis,<br>
I've noted some concerns inline below. I'm a bit inexperienced here, so<br>
please do correct/educate me where I'm wrong.<br>
<br>
<br>
> ---<br>
> protocol/wayland.xml | 75 ++++++++++++++++++++++++++++++++++++++++++++--------<br>
> 1 file changed, 64 insertions(+), 11 deletions(-)<br>
><br>
> diff --git a/protocol/wayland.xml b/protocol/wayland.xml<br>
> index 12a6efd..d19d898 100644<br>
> --- a/protocol/wayland.xml<br>
> +++ b/protocol/wayland.xml<br>
> @@ -910,11 +910,6 @@<br>
>       copy-and-paste and drag-and-drop.  These mechanisms are tied to<br>
>       a wl_seat and this interface lets a client get a wl_data_device<br>
>       corresponding to a wl_seat.<br>
> -<br>
> -      Depending on the version bound, the objects created from the bound<br>
> -      wl_data_device_manager object will have different requirements for<br>
> -      functioning properly. See wl_data_source.set_actions,<br>
> -      wl_data_offer.accept and wl_data_offer.finish for details.<br>
<br>
What does the deletion of this paragraph have to do with adding the<br>
two new touchpoint shape events?<br>
<br>
<br>
>     </description><br>
><br>
>     <request name="create_data_source"><br>
> @@ -1656,7 +1651,7 @@<br>
>     </request><br>
>    </interface><br>
><br>
> -  <interface name="wl_seat" version="5"><br>
> +  <interface name="wl_seat" version="6"><br>
<br>
Why are you bumping this instead of just bumping the version of the<br>
wl_touch interface?<br>
<br>
<br>
>     <description summary="group of input devices"><br>
>       A seat is a group of keyboards, pointer and touch devices. This<br>
>       object is published as a global during start up, or when such a<br>
> @@ -1765,7 +1760,7 @@<br>
><br>
>   </interface><br>
><br>
> -  <interface name="wl_pointer" version="5"><br>
> +  <interface name="wl_pointer" version="6"><br>
<br>
Why are you bumping this instead of just bumping the version of the<br>
wl_touch interface?<br>
<br>
<br>
>     <description summary="pointer input device"><br>
>       The wl_pointer interface represents one or more input devices,<br>
>       such as mice, which control the pointer location and pointer_focus<br>
> @@ -2038,7 +2033,7 @@<br>
><br>
>  The timestamp is to be interpreted identical to the timestamp in the<br>
>  wl_pointer.axis event. The timestamp value may be the same as a<br>
> - preceding wl_pointer.axis event.<br>
> + preceeding wl_pointer.axis event.<br>
<br>
Why are you introducing a misspelling?<br>
<br>
<br>
>       </description><br>
>       <arg name="time" type="uint" summary="timestamp with<br>
> millisecond granularity"/><br>
>       <arg name="axis" type="uint" enum="axis" summary="the axis<br>
> stopped with this event"/><br>
> @@ -2078,7 +2073,7 @@<br>
>     </event><br>
>   </interface><br>
><br>
> -  <interface name="wl_keyboard" version="5"><br>
> +  <interface name="wl_keyboard" version="6"><br>
<br>
Why are you bumping this instead of just bumping the version of the<br>
wl_touch interface?<br>
<br>
<br>
>     <description summary="keyboard input device"><br>
>       The wl_keyboard interface represents one or more keyboards<br>
>       associated with a seat.<br>
> @@ -2192,7 +2187,7 @@<br>
>     </event><br>
>   </interface><br>
><br>
> -  <interface name="wl_touch" version="5"><br>
> +  <interface name="wl_touch" version="6"><br>
>     <description summary="touchscreen input device"><br>
>       The wl_touch interface represents a touchscreen<br>
>       associated with a seat.<br>
> @@ -2242,7 +2237,12 @@<br>
><br>
>     <event name="frame"><br>
>       <description summary="end of touch frame event"><br>
> - Indicates the end of a contact point list.<br>
> +  Indicates the end of a contract point list. The wayland protocol requires<br>
<br>
contact point list.<br>
<br>
<br>
> +  touch point updates to be sent sequentially, however all events within a<br>
> +  frame should be considered one hardware event. A wl_touch.frames terminates<br>
<br>
wl_touch.frame<br>
<br>
<br>
> +  at least one event but otherwise no guarantee is provided about the set of<br>
> +  events within a frame. A client must assume that any state not updated in a<br>
> +  frame is unchanged from the previously known state.<br>
<br>
Am I misreading this or has indentation been obliterated?<br>
<br>
<br>
>       </description><br>
>     </event><br>
><br>
> @@ -2262,6 +2262,59 @@<br>
>     <request name="release" type="destructor" since="3"><br>
>       <description summary="release the touch object"/><br>
>     </request><br>
> +<br>
> +    <!-- Version 6 additions --><br>
> +<br>
> +    <event name="shape" since="6"><br>
> +      <description summary="update shape of touch point"><br>
> +  Sent when a touchpoint has changed its shape. If the touch position<br>
> +  or orientation changed at the same time, the wl_touch.motion,<br>
> +  wl_touch.orientation and wl_touch.shape are sent within the same<br>
> +  wl_touch.frame.<br>
> +  Otherwise, only a wl_touch.shape is sent within this wl_touch.frame.<br>
<br>
Same paragraph? And indentation?<br>
<br>
<br>
> +  The protocol does not guarantee specific ordering of wl_touch.orientation,<br>
> +  wl_touch.shape and wl_touch.motion events.<br>
> +<br>
> +  A touchpoint shape is approximated by an ellipse through the major and minor<br>
> +  axis length. The major axis length describes the longest diameter of the<br>
> +  ellipse, while the minor axis length describes the shortest diameter.<br>
> +  Both are specified in surface coordinates.<br>
> +  The center of the ellipse is always at the touchpoint location as reported<br>
<br>
Same paragraph? And indentation?<br>
<br>
<br>
> +  by wl_touch.down or wl_touch.move.<br>
> +<br>
> +  This event is only sent by the compositor if the touch device supports shape<br>
> +  reports. The client has to make reasonable assumptions about the shape if<br>
> +  it did not receive this event.<br>
<br>
This last sentence seems unnecessary.<br>
<br>
<br>
> +      </description><br>
> +      <arg name="id" type="int" summary="the unique ID of this touch point"/><br>
> +      <arg name="major" type="fixed" summary="length of the major<br>
> axis in surface coordinates"/><br>
> +      <arg name="minor" type="fixed" summary="length of the minor<br>
> axis in surface coordinates"/><br>
<br>
I politely encourage "surface local coordinates."<br>
<a href="https://lists.freedesktop.org/archives/wayland-devel/2016-April/027804.html" rel="noreferrer" target="_blank">https://lists.freedesktop.org/archives/wayland-devel/2016-April/027804.html</a><br>
<br>
<br>
> +    </event><br>
> +<br>
> +    <event name="orientation" since="6"><br>
> +      <description summary="update orientation of touch point"><br>
> +  Sent when a touchpoint has changed its orientation. If the touch position<br>
> +  or shape changed at the same time, the wl_touch.motion, wl_touch.orientation<br>
> +  and wl_touch.shape are sent within the same wl_touch.frame.<br>
> +  Otherwise, only a wl_touch.orientation is sent within this wl_touch.frame.<br>
> +  The protocol does not guarantee specific ordering of wl_touch.orientation,<br>
> +  wl_touch.shape and wl_touch.motion events.<br>
> +<br>
> +  The orientation describes the clockwise angle of touchpoints major axis to<br>
> +  the surface y-axis and is normalized to the -180 to +180 degrees range.<br>
> +  The granuality of orientation depends on the touch device, some devices only<br>
> +  support binary rotation values between 0 and 90 degrees.<br>
> +<br>
> +  This event is only sent by the compositor if the touch device supports<br>
> +  orientation reports.<br>
> +  The client has to make reasonable assumptions about the orientation if<br>
> +  it did not receive this event.<br>
<br>
As mentioned in the shape event, I feel this last sentence is unnecessary.<br>
And, am I misreading or is the indentation missing?<br>
<br>
> +      </description><br>
> +      <arg name="id" type="int" summary="the unique ID of this touch point"/><br>
> +      <arg name="orientation" type="fixed"<br>
> +           summary="angle between major axis and surface y-axis in degrees"/><br>
> +    </event><br>
> +<br>
<br>
Omitting this line break would match the current convention.<br>
<br>
>   </interface><br>
><br>
>   <interface name="wl_output" version="2"><br>
> --<br>
> 2.8.0.rc3.226.g39d4020<br>
> _______________________________________________<br>
> wayland-devel mailing list<br>
> <a href="mailto:wayland-devel@lists.freedesktop.org" target="_blank">wayland-devel@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/wayland-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
<br>
</blockquote></div>