[PATCH wayland-protocols] unstable: Add the Wayland Wobbly Windows protocol

Derek Foreman derekf at osg.samsung.com
Mon Apr 4 18:43:34 UTC 2016


On 01/04/16 11:19 AM, Daniel Stone wrote:
> Hi,
> 
> On 1 April 2016 at 16:14, Derek Foreman <derekf at osg.samsung.com> wrote:
>> diff --git a/unstable/www/www-unstable-v1.xml b/unstable/www/www-unstable-v1.xml
>> new file mode 100644
>> index 0000000..cb928a9
>> --- /dev/null
>> +++ b/unstable/www/www-unstable-v1.xml
>> @@ -0,0 +1,58 @@
>> +<?xml version="1.0" encoding="UTF-8"?>
>> +<protocol name="zwp_www">
>> +
>> +  <copyright>
>> +    Copyright C 2016      Samsung Electronics
> 
> It's 2016: we have Unicode copyright codepoints.

An unfortunate cut and paste at the console. :)

>> +  <description summary="Protocol for Wayland Wobbly Windows">
> 
> Where did we land on capitalisation rules for protocol elements? I forget.

Seems fairly random in wayland-protocols right now, honestly.

>> +    This protocol provides support for wobbly windows on Wayland by
>> +    informing a client when it has moved or is being dragged.
>> +  </description>
> 
> Doesn't the client know it's being dragged most of the time anyway,
> due to wl_shell::drag and friends?

If a client initiates the drag itself with xdg_shell.move, it would know
this.  I don't think there's a way to know if it's a compositor
initiated move? (mod+drag in weston, for example)

So yeah, I think most of the time it does know - but sometimes it doesn't?

>> +  <interface name="www" version="1">
>> +    <request name="create">
>> +      <description summary="Create an object for WWW notifications">
>> +      </description>
>> +      <arg name="id" type="new_id" interface="www_surface"/>
>> +      <arg name="surface" type="object" interface="wl_surface"/>
>> +    </request>
>> +  </interface>
> 
> These are not great descriptions, honestly. Is the surface required to
> have a particular role (e.g. toplevel)?

We'll provide better descriptions in the next revision.

>> +  <interface name="www_surface" version="1">
>> +    <event name="status">
>> +       <description summary="Status update on a www_surface"></description>
> 
> This could be better described, since it's relative input. Is it unaccelerated?

Certainly unaccelerated - see below.

>> +       <arg name="x_rel" type="int"/>
>> +       <arg name="y_rel" type="int"/>
> 
> Not fixed? :(

They're changes in window position when it's moved, so precision greater
than pixels is probably fairly dramatic overkill.

>> +       <arg name="timestamp" type="uint"/>
> 
> What units does the timestamp use? What about reusing the
> relative-pointer from Jonas?

Precision greater than ms is probably overkill too.

Better documentation would probably sort these concerns?

>> +    <event name="start_drag">
>> +       <description summary="Drag has started"></description>
>> +    </event>
>> +    <event name="end_drag">
>> +       <description summary="Drag has ended"></description>
>> +    </event>
> 
> You may want to make it clear here that this does not relate to drag & drop.

Sure.

>> +    <request name="destroy" type="destructor">
>> +      <description summary="Destroy a www_surface">
>> +      </description>
>> +    </request>
> 
> The parent interface lacks a destructor as well.

Fair point. :)

> Overall, 2/10. See me after class.
> 
> Cheers,
> Daniel
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
> 



More information about the wayland-devel mailing list