[PATCHv4] Add name event to xdg-output

Jonas Ã…dahl jadahl at gmail.com
Mon Apr 16 12:57:15 UTC 2018


On Sat, Apr 14, 2018 at 10:15:08AM -0400, Drew DeVault 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">
> +      <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.

I'd still like a bit more clarification about what to expect of this
string. What I'm trying to avoid is one compositor sending "eDP-1" while
another sends "Built-in Display". For example, the first is suitable for
command line interfaces (e.g. movie-player --fullscreen-on HDMI-2), but
the second is suitable for GUI's (e.g. a widget for selecting what
monitor to play a movie on). If it can be either one, I don't see its
usefulness in a generic client.

I'm suspecting, given what you've written in other E-mails in this
thread that you intend to use this for the "HDMI-1" style names, but at
the same time I've seen the word "human readable" been used which more
commonly refers to "Built-in Display" or "ASUS 24"", which might not
even be unique (there might be two 24 inch ASUS monitors connected).

I don't want to end up with a situation where we get wildly different
results depending on what compositor is the one sending the value.

What I'm assuming is a major reason for keeping things relatively vague
is to make sure that it's not specifically connector data, as that may
not be available for centain types of compositors.


Jonas

> +
> +    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.
> +      </description>
> +      <arg name="name" type="string" summary="output name"/>
> +    </event>
> +
>    </interface>
>  </protocol>
> -- 
> 2.17.0
> 
> _______________________________________________
> 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