[PATCHv4] Add name event to xdg-output

Pekka Paalanen ppaalanen at gmail.com
Mon Apr 16 07:53:04 UTC 2018


Hi,

one elementary detail I have missed is that you have no commit message.
For the record, you should give a justification for why xdg_output
needs a name event added.


On Sat, 14 Apr 2018 10:15:08 -0400
Drew DeVault <sir at cmpwn.com> wrote:

> Signed-off-by: Drew DeVault <sir at cmpwn.com>
> Reviewed-by: Simon Ser <contact at emersion.fr>
> ---
> This revision addresses Pekka's feedback, specifying that the output
> name will not change over the lifetime of the xdg_output. This also
> answers a question from an earlier email:
> 
> On 2018-04-11 11:02 AM, Pekka Paalanen wrote:
> > There is still the corner-case of: can removing wl_output global A
> > cause the name for wl_output global B to change, but I suppose that
> > falls to common sense to not do so strange things.  
> 
> Since the name can no longer change, this is implicitly addressed.
> 
> Also bumps the version on zxdg_output_manager_v1.
> 
>  .../xdg-output/xdg-output-unstable-v1.xml     | 22 +++++++++++++++++--
>  1 file changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/unstable/xdg-output/xdg-output-unstable-v1.xml b/unstable/xdg-output/xdg-output-unstable-v1.xml
> index 0c0c481..c0f6b0e 100644
> --- a/unstable/xdg-output/xdg-output-unstable-v1.xml
> +++ b/unstable/xdg-output/xdg-output-unstable-v1.xml
> @@ -54,7 +54,7 @@
>      reset.
>    </description>
>  
> -  <interface name="zxdg_output_manager_v1" version="1">
> +  <interface name="zxdg_output_manager_v1" version="2">
>      <description summary="manage xdg_output objects">
>        A global factory interface for xdg_output objects.
>      </description>
> @@ -77,7 +77,7 @@
>      </request>
>    </interface>
>  
> -  <interface name="zxdg_output_v1" version="1">
> +  <interface name="zxdg_output_v1" version="2">
>      <description summary="compositor logical output region">
>        An xdg_output describes part of the compositor geometry.
>  
> @@ -157,5 +157,23 @@
>        </description>
>      </event>
>  
> +    <event name="name" since="2">

All the versioning stuff seem good now.

> +      <description summary="name of this output">
> +    Many compositors will assign names to their outputs, show them to the user,
> +    allow them to be configured by name, etc. The client may wish to know this
> +    name as well to offer the user similar behaviors.
> +
> +    The naming convention is compositor defined. Each name is unique among all
> +    wl_output globals, but if a wl_output global is destroyed the same name may
> +    be reused later. The names will also remain consistent across sessions with
> +    the same hardware and software configuration.
> +
> +    The name event is sent after creating an xdg_output (see
> +    xdg_output_manager.get_xdg_output). The name does not change over the
> +    lifetime of the xdg_output, and this event will not be sent again.

That's very clear, but is it precisely your intention? Would it make
more sense to define that the name does not change during the lifetime
of the wl_output global instead? That would guarantee that the name
will stay the same for the same wl_output global even if one creates
new xdg_output objects or even restarts the application or starts
another application.

Or do you think that's already implied by the previous paragraph?

Would there be any harm in using the lifetime of the wl_output global
in the wording? I think it would be more clear than the current wording.


Thanks,
pq

> +      </description>
> +      <arg name="name" type="string" summary="output name"/>
> +    </event>
> +
>    </interface>
>  </protocol>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20180416/a4174f63/attachment.sig>


More information about the wayland-devel mailing list