[PATCHv4] Add name event to xdg-output

Drew DeVault sir at cmpwn.com
Sat Apr 14 14:15:08 UTC 2018


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.
+
+    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



More information about the wayland-devel mailing list