protocol: add wl_output.{name,description}
This is inspired from xdg-output-unstable-v1. This allows clients to get the name and description without having to use xdg_output. This should eventually allow us to restrict xdg_output to clients like Xwayland. The name is a unique non-persistent user-friendly string that can be used to refer to an output. This can be used by Wayland clients to refer to a specific wl_output (e.g. across processes or in CLI arguments). The description is a non-unique user-friendly string that can be displayed to the user. Signed-off-by: Simon Ser <contact@emersion.fr> References: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/7
This commit is contained in:
parent
aa88321517
commit
9c05e6c475
|
@ -2504,7 +2504,7 @@
|
|||
</event>
|
||||
</interface>
|
||||
|
||||
<interface name="wl_output" version="3">
|
||||
<interface name="wl_output" version="4">
|
||||
<description summary="compositor output region">
|
||||
An output describes part of the compositor geometry. The
|
||||
compositor works in the 'compositor coordinate system' and an
|
||||
|
@ -2568,7 +2568,7 @@
|
|||
implementing a desktop-style output layout or those exposing virtual
|
||||
outputs, might fake this information. Instead of using x and y, clients
|
||||
should use xdg_output.logical_position. Instead of using make and model,
|
||||
clients should use xdg_output.name and xdg_output.description.
|
||||
clients should use name and description.
|
||||
</description>
|
||||
<arg name="x" type="int"
|
||||
summary="x position within the global compositor space"/>
|
||||
|
@ -2687,6 +2687,62 @@
|
|||
use the output object anymore.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<!-- Version 4 additions -->
|
||||
|
||||
<event name="name" since="4">
|
||||
<description summary="name of this output">
|
||||
Many compositors will assign user-friendly names to their outputs, show
|
||||
them to the user, allow the user to refer to an output, etc. The client
|
||||
may wish to know this name as well to offer the user similar behaviors.
|
||||
|
||||
The name is a UTF-8 string with no convention defined for its contents.
|
||||
Each name is unique among all wl_output globals. The name is only
|
||||
guaranteed to be unique for the compositor instance.
|
||||
|
||||
The same output name is used for all clients for a given wl_output
|
||||
global. Thus, the name can be shared across processes to refer to a
|
||||
specific wl_output global.
|
||||
|
||||
The name is not guaranteed to be persistent across sessions, thus cannot
|
||||
be used to reliably identify an output in e.g. configuration files.
|
||||
|
||||
Examples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc. However, do
|
||||
not assume that the name is a reflection of an underlying DRM connector,
|
||||
X11 connection, etc.
|
||||
|
||||
The name event is sent after binding the output object. This event is
|
||||
only sent once per output object, and the name does not change over the
|
||||
lifetime of the wl_output global.
|
||||
|
||||
Compositors may re-use the same output name if the wl_output global is
|
||||
destroyed and re-created later. Compositors should avoid re-using the
|
||||
same name if possible.
|
||||
|
||||
The name event will be followed by a done event.
|
||||
</description>
|
||||
<arg name="name" type="string" summary="output name"/>
|
||||
</event>
|
||||
|
||||
<event name="description" since="4">
|
||||
<description summary="human-readable description of this output">
|
||||
Many compositors can produce human-readable descriptions of their
|
||||
outputs. The client may wish to know this description as well, e.g. for
|
||||
output selection purposes.
|
||||
|
||||
The description is a UTF-8 string with no convention defined for its
|
||||
contents. The description is not guaranteed to be unique among all
|
||||
wl_output globals. Examples might include 'Foocorp 11" Display' or
|
||||
'Virtual X11 output via :1'.
|
||||
|
||||
The description event is sent after binding the output object and
|
||||
whenever the description changes. The description is optional, and may
|
||||
not be sent at all.
|
||||
|
||||
The description event will be followed by a done event.
|
||||
</description>
|
||||
<arg name="description" type="string" summary="output description"/>
|
||||
</event>
|
||||
</interface>
|
||||
|
||||
<interface name="wl_region" version="1">
|
||||
|
|
Loading…
Reference in New Issue
Block a user