[wayland-protocols] xdg-output: make xdg_output.description mutable

Submitted by Simon Ser on April 27, 2019, 8:16 a.m.

Details

Message ID zsrzAl0Jsy1uImG_nBvcy4XPxgORETAoH401MijMFEp9V9_t0AWqI8DFbDxJi260MteE1plop4qHPb_4mCc5zf7DcbaUpNJ2-bJnqXPlv8A=@emersion.fr
State Changes Requested
Headers show
Series "xdg-output: make xdg_output.description mutable" ( rev: 1 ) in Wayland

Not browsing as part of any series.

Commit Message

Simon Ser April 27, 2019, 8:16 a.m.
The output description is a human-readable text describing the output. Unlike
the name which uniquely identifies the output, it's intended to be displayed to
the user.

It might be desirable for a compositor to update an output's description. For
instance, when only one output is plugged in, it's not necessary to dump make,
model, serial and connector to the description, something like "Dell U2717D" is
enough. However when two identical outputs are plugged in it's necessary to add
e.g. the connector type to tell them apart ("Dell U2717D on HDMI"). See [1] for
a discussion about this.

This commit bumps xdg_output's version to allow compositors to update the
property.

[1]: https://github.com/swaywm/wlroots/issues/1623

Signed-off-by: Simon Ser <contact@emersion.fr>
---
 unstable/xdg-output/xdg-output-unstable-v1.xml | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

--
2.21.0

Patch hide | download patch | download mbox

diff --git a/unstable/xdg-output/xdg-output-unstable-v1.xml b/unstable/xdg-output/xdg-output-unstable-v1.xml
index ccbfe1c..86216a7 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="2">
+  <interface name="zxdg_output_manager_v1" version="3">
     <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="2">
+  <interface name="zxdg_output_v1" version="3">
     <description summary="compositor logical output region">
       An xdg_output describes part of the compositor geometry.

@@ -197,10 +197,12 @@ 
 	output via :1'.

 	The description event is sent after creating an xdg_output (see
-	xdg_output_manager.get_xdg_output). This event is only sent once per
+	xdg_output_manager.get_xdg_output) and whenever the description
+	changes. The description is optional, and may not be sent at all.
+
+	For objects of version 2 and lower, this event is only sent once per
 	xdg_output, and the description does not change over the lifetime of
-	the wl_output global. The description is optional, and may not be sent
-	at all.
+	the wl_output global.
       </description>
       <arg name="description" type="string" summary="output description"/>
     </event>

Comments

Hi Jonas,

What do you think of this patch?

Thanks,

Simon

On Saturday, April 27, 2019 11:16 AM, Simon Ser <contact@emersion.fr> wrote:
> The output description is a human-readable text describing the output. Unlike
> the name which uniquely identifies the output, it's intended to be displayed to
> the user.
>
> It might be desirable for a compositor to update an output's description. For
> instance, when only one output is plugged in, it's not necessary to dump make,
> model, serial and connector to the description, something like "Dell U2717D" is
> enough. However when two identical outputs are plugged in it's necessary to add
> e.g. the connector type to tell them apart ("Dell U2717D on HDMI"). See [1] for
> a discussion about this.
>
> This commit bumps xdg_output's version to allow compositors to update the
> property.
>
> [1]: https://github.com/swaywm/wlroots/issues/1623
>
> Signed-off-by: Simon Ser <contact@emersion.fr>
> ---
>  unstable/xdg-output/xdg-output-unstable-v1.xml | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/unstable/xdg-output/xdg-output-unstable-v1.xml b/unstable/xdg-output/xdg-output-unstable-v1.xml
> index ccbfe1c..86216a7 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="2">
> +  <interface name="zxdg_output_manager_v1" version="3">
>      <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="2">
> +  <interface name="zxdg_output_v1" version="3">
>      <description summary="compositor logical output region">
>        An xdg_output describes part of the compositor geometry.
>
> @@ -197,10 +197,12 @@
>  	output via :1'.
>
>  	The description event is sent after creating an xdg_output (see
> -	xdg_output_manager.get_xdg_output). This event is only sent once per
> +	xdg_output_manager.get_xdg_output) and whenever the description
> +	changes. The description is optional, and may not be sent at all.
> +
> +	For objects of version 2 and lower, this event is only sent once per
>  	xdg_output, and the description does not change over the lifetime of
> -	the wl_output global. The description is optional, and may not be sent
> -	at all.
> +	the wl_output global.
>        </description>
>        <arg name="description" type="string" summary="output description"/>
>      </event>
> --
> 2.21.0
On Sun, Jun 23, 2019 at 10:05:09AM +0000, Simon Ser wrote:
> Hi Jonas,
> 
> What do you think of this patch?

Maybe want to say something about how this interacts with 'done'?


Jonas

> 
> Thanks,
> 
> Simon
> 
> On Saturday, April 27, 2019 11:16 AM, Simon Ser <contact@emersion.fr> wrote:
> > The output description is a human-readable text describing the output. Unlike
> > the name which uniquely identifies the output, it's intended to be displayed to
> > the user.
> >
> > It might be desirable for a compositor to update an output's description. For
> > instance, when only one output is plugged in, it's not necessary to dump make,
> > model, serial and connector to the description, something like "Dell U2717D" is
> > enough. However when two identical outputs are plugged in it's necessary to add
> > e.g. the connector type to tell them apart ("Dell U2717D on HDMI"). See [1] for
> > a discussion about this.
> >
> > This commit bumps xdg_output's version to allow compositors to update the
> > property.
> >
> > [1]: https://github.com/swaywm/wlroots/issues/1623
> >
> > Signed-off-by: Simon Ser <contact@emersion.fr>
> > ---
> >  unstable/xdg-output/xdg-output-unstable-v1.xml | 12 +++++++-----
> >  1 file changed, 7 insertions(+), 5 deletions(-)
> >
> > diff --git a/unstable/xdg-output/xdg-output-unstable-v1.xml b/unstable/xdg-output/xdg-output-unstable-v1.xml
> > index ccbfe1c..86216a7 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="2">
> > +  <interface name="zxdg_output_manager_v1" version="3">
> >      <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="2">
> > +  <interface name="zxdg_output_v1" version="3">
> >      <description summary="compositor logical output region">
> >        An xdg_output describes part of the compositor geometry.
> >
> > @@ -197,10 +197,12 @@
> >  	output via :1'.
> >
> >  	The description event is sent after creating an xdg_output (see
> > -	xdg_output_manager.get_xdg_output). This event is only sent once per
> > +	xdg_output_manager.get_xdg_output) and whenever the description
> > +	changes. The description is optional, and may not be sent at all.
> > +
> > +	For objects of version 2 and lower, this event is only sent once per
> >  	xdg_output, and the description does not change over the lifetime of
> > -	the wl_output global. The description is optional, and may not be sent
> > -	at all.
> > +	the wl_output global.
> >        </description>
> >        <arg name="description" type="string" summary="output description"/>
> >      </event>
> > --
> > 2.21.0
>
On Mon, Jun 24, 2019 at 9:07 AM Jonas Ådahl <jadahl@gmail.com> wrote:
>
> On Sun, Jun 23, 2019 at 10:05:09AM +0000, Simon Ser wrote:
> > Hi Jonas,
> >
> > What do you think of this patch?
>
> Maybe want to say something about how this interacts with 'done'?
>

There is another patch to remove xdg_output.done as well, not sure
where we stand with that.

I would also mention under which circumstances it may change (as it
was initially said that it would be sent once as the description does
not change, ever).

Cheers,
Olivier.
Hi,

On Sat, 27 Apr 2019 at 09:16, Simon Ser <contact@emersion.fr> wrote:
> The output description is a human-readable text describing the output. Unlike
> the name which uniquely identifies the output, it's intended to be displayed to
> the user.
>
> It might be desirable for a compositor to update an output's description. For
> instance, when only one output is plugged in, it's not necessary to dump make,
> model, serial and connector to the description, something like "Dell U2717D" is
> enough. However when two identical outputs are plugged in it's necessary to add
> e.g. the connector type to tell them apart ("Dell U2717D on HDMI"). See [1] for
> a discussion about this.
>
> This commit bumps xdg_output's version to allow compositors to update the
> property.

We definitely need to figure out 'done', and ideally have it come in
the same version bump, but with that and one small nitpick resolved
this is:
Acked-by: Daniel Stone <daniels@collabora.com>

-       xdg_output_manager.get_xdg_output). This event is only sent once per
+       xdg_output_manager.get_xdg_output) and whenever the description
+       changes. The description is optional, and may not be sent at all.

To be honest, rather than have the clients open-code their own '(no
description)' strings - and some of them will definitely forget to do
it - I would keep the requirement that it is sent during initial
advertisement.

Cheers,
Daniel
On Monday, June 24, 2019 10:06 AM, Jonas Ådahl <jadahl@gmail.com> wrote:
> On Sun, Jun 23, 2019 at 10:05:09AM +0000, Simon Ser wrote:
> > Hi Jonas,
> >
> > What do you think of this patch?
>
> Maybe want to say something about how this interacts with 'done'?

Good idea. It depends what happens to [1] I guess, and in which order we want
patches to be merged. It probably makes more sense to first merge [1] and then
this patch, so that we don't have to fix the new behaviour's description. Did
you have a chance to have a look at [1], Jonas?

[1]: https://patchwork.freedesktop.org/patch/302299/?series=60019&rev=1
On Monday, June 24, 2019 10:08 AM, Olivier Fourdan <ofourdan@redhat.com> wrote:
> On Mon, Jun 24, 2019 at 9:07 AM Jonas Ådahl jadahl@gmail.com wrote:
>
> > On Sun, Jun 23, 2019 at 10:05:09AM +0000, Simon Ser wrote:
> >
> > > Hi Jonas,
> > > What do you think of this patch?
> >
> > Maybe want to say something about how this interacts with 'done'?
>
> There is another patch to remove xdg_output.done as well, not sure
> where we stand with that.
>
> I would also mention under which circumstances it may change (as it
> was initially said that it would be sent once as the description does
> not change, ever).

I'd like to keep this compositor-defined: the compositor can change it
whenever it wants.
On Monday, June 24, 2019 1:29 PM, Daniel Stone <daniel@fooishbar.org> wrote:
> Hi,
>
> On Sat, 27 Apr 2019 at 09:16, Simon Ser <contact@emersion.fr> wrote:
> > The output description is a human-readable text describing the output. Unlike
> > the name which uniquely identifies the output, it's intended to be displayed to
> > the user.
> >
> > It might be desirable for a compositor to update an output's description. For
> > instance, when only one output is plugged in, it's not necessary to dump make,
> > model, serial and connector to the description, something like "Dell U2717D" is
> > enough. However when two identical outputs are plugged in it's necessary to add
> > e.g. the connector type to tell them apart ("Dell U2717D on HDMI"). See [1] for
> > a discussion about this.
> >
> > This commit bumps xdg_output's version to allow compositors to update the
> > property.
>
> We definitely need to figure out 'done', and ideally have it come in
> the same version bump, but with that and one small nitpick resolved
> this is:
> Acked-by: Daniel Stone <daniels@collabora.com>

Thanks!

> -       xdg_output_manager.get_xdg_output). This event is only sent once per
> +       xdg_output_manager.get_xdg_output) and whenever the description
> +       changes. The description is optional, and may not be sent at all.
>
> To be honest, rather than have the clients open-code their own '(no
> description)' strings - and some of them will definitely forget to do
> it - I would keep the requirement that it is sent during initial
> advertisement.

The event was previously optional too. If we want to change that, I think it
belongs to another commit.
On Sat, Apr 27, 2019 at 08:16:04AM +0000, Simon Ser wrote:
> The output description is a human-readable text describing the output. Unlike
> the name which uniquely identifies the output, it's intended to be displayed to
> the user.
> 
> It might be desirable for a compositor to update an output's description. For
> instance, when only one output is plugged in, it's not necessary to dump make,
> model, serial and connector to the description, something like "Dell U2717D" is
> enough. However when two identical outputs are plugged in it's necessary to add
> e.g. the connector type to tell them apart ("Dell U2717D on HDMI"). See [1] for
> a discussion about this.
> 
> This commit bumps xdg_output's version to allow compositors to update the
> property.

Seems fine to me. Want to rebase on top of the deprecation of
xdg_output.done?


Jonas

> 
> [1]: https://github.com/swaywm/wlroots/issues/1623
> 
> Signed-off-by: Simon Ser <contact@emersion.fr>
> ---
>  unstable/xdg-output/xdg-output-unstable-v1.xml | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/unstable/xdg-output/xdg-output-unstable-v1.xml b/unstable/xdg-output/xdg-output-unstable-v1.xml
> index ccbfe1c..86216a7 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="2">
> +  <interface name="zxdg_output_manager_v1" version="3">
>      <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="2">
> +  <interface name="zxdg_output_v1" version="3">
>      <description summary="compositor logical output region">
>        An xdg_output describes part of the compositor geometry.
> 
> @@ -197,10 +197,12 @@
>  	output via :1'.
> 
>  	The description event is sent after creating an xdg_output (see
> -	xdg_output_manager.get_xdg_output). This event is only sent once per
> +	xdg_output_manager.get_xdg_output) and whenever the description
> +	changes. The description is optional, and may not be sent at all.
> +
> +	For objects of version 2 and lower, this event is only sent once per
>  	xdg_output, and the description does not change over the lifetime of
> -	the wl_output global. The description is optional, and may not be sent
> -	at all.
> +	the wl_output global.
>        </description>
>        <arg name="description" type="string" summary="output description"/>
>      </event>
> --
> 2.21.0
> 
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
On Wed, Jul 17, 2019 at 10:05 AM Jonas Ådahl <jadahl@redhat.com> wrote:
>
> On Sat, Apr 27, 2019 at 08:16:04AM +0000, Simon Ser wrote:
> > The output description is a human-readable text describing the output. Unlike
> > the name which uniquely identifies the output, it's intended to be displayed to
> > the user.
> >
> > It might be desirable for a compositor to update an output's description. For
> > instance, when only one output is plugged in, it's not necessary to dump make,
> > model, serial and connector to the description, something like "Dell U2717D" is
> > enough. However when two identical outputs are plugged in it's necessary to add
> > e.g. the connector type to tell them apart ("Dell U2717D on HDMI"). See [1] for
> > a discussion about this.
> >
> > This commit bumps xdg_output's version to allow compositors to update the
> > property.
>
> Seems fine to me. Want to rebase on top of the deprecation of
> xdg_output.done?

This, with `xdg_output.done` removal, this is:

Acked-by: Olivier Fourdan <ofourdan@redhat.com>

Cheers,
Olivier