From 9c05e6c475e0f67519d88f285a971b5e51455a1d Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sun, 24 Jan 2021 12:26:53 +0100 Subject: [PATCH] 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 References: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/7 --- protocol/wayland.xml | 60 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/protocol/wayland.xml b/protocol/wayland.xml index 6001adc..e3dab2e 100644 --- a/protocol/wayland.xml +++ b/protocol/wayland.xml @@ -2504,7 +2504,7 @@ - + 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. @@ -2687,6 +2687,62 @@ use the output object anymore. + + + + + + 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. + + + + + + + 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. + + +