[PATCHv3] Add name event to xdg-output
Pekka Paalanen
ppaalanen at gmail.com
Wed Apr 11 08:02:51 UTC 2018
On Tue, 10 Apr 2018 20:27:55 -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 version clarifies the uniqueness constraint, mapping of names to
> wl_outputs, and persistence between sessions.
>
> .../xdg-output/xdg-output-unstable-v1.xml | 19 ++++++++++++++++++-
> 1 file changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/unstable/xdg-output/xdg-output-unstable-v1.xml b/unstable/xdg-output/xdg-output-unstable-v1.xml
> index 0c0c481..b46c9df 100644
> --- a/unstable/xdg-output/xdg-output-unstable-v1.xml
> +++ b/unstable/xdg-output/xdg-output-unstable-v1.xml
> @@ -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,22 @@
> </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.
So the name needs to be human-friendly, good.
> +
> + 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.
Excellent, you already took care of what I just wrote in the previous
email.
> +
> + The name event is sent after creating an xdg_output (see
> + xdg_output_manager.get_xdg_output).
Specifying when the event can be sent or expected, good. It is also
mandatory to send in interface version 2, and consistency rule above
implies that a compositor cannot suddenly change the name.
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.
I do wonder, if I used a naming scheme like this:
on top: Intel GMA: DVI-D-1: Viewsonic VP171B (S/N: 8764358365)
on bottom: GeForce 8800: HDMI-2: HP ZDisplay K99 (S/N: 98728462)
and then the user reconfigures the output layout, can the compositor
send updated names to all clients that already have an xdg-output object?
> + </description>
> + <arg name="name" type="string" summary="output name"/>
> + </event>
> +
> </interface>
> </protocol>
Thanks,
pq
-------------- 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/20180411/1aee1ef3/attachment.sig>
More information about the wayland-devel
mailing list