[PATCHv4] Add name event to xdg-output
sir at cmpwn.com
Wed Apr 18 12:21:29 UTC 2018
Replying to everyone.
On 2018-04-18 5:32 AM, Simon Ser wrote:
> I agree with Jonas here. Maybe we could add two fields:
> - "codename", restricted to alphanumeric + hyphens characters (to reflect the
> current informal practice to name outputs like "VGA-1"), specified to be
> unique and persistent. These could be used in configuration files.
> - "description", specified to be human-readable and not necessarily unique.
> These could be used in user interfaces.
I still haven't been convinced but I think everyone's said their piece
and I'm running out of patience. I would consider the following:
diff --git a/unstable/xdg-output/xdg-output-unstable-v1.xml b/unstable/xdg-output/xdg-output-unstable-v1.xml
index b49a40e..67b4630 100644
@@ -163,18 +163,40 @@
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 naming convention is compositor defined, but limited to alphanumeric
+ characters and dashes (-). 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.
+ 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 creating an xdg_output (see
xdg_output_manager.get_xdg_output). This event is only sent once per
xdg_output, and the name does not change over the lifetime of the
+ wl_output global.
<arg name="name" type="string" summary="output name"/>
+ <event name="description" since="2">
+ <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, to communicate the
+ user for various purposes.
+ The description is a UTF-8 string with no convention defined for its
+ contents. Examples might include 'Foocorp 11" Display' or 'Virtual X11
+ 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, 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.
More information about the wayland-devel