From af29ece33cf935a146067df9de13d0896d742aaf Mon Sep 17 00:00:00 2001
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date: Tue, 23 Mar 2021 13:33:12 +0200
Subject: [PATCH] fullscreen-shell: Clarify that present requests assign a
 surface role

Currently, the spec doesn't say explicitly that present requests assign
a surface role. Given that, it can be viewed as the protocol modifies
an already assigned surface role, e.g. xdg-toplevel, and present requests
only act as hints.

Signed-off-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
---
 .../fullscreen-shell/fullscreen-shell-unstable-v1.xml    | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml b/unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml
index 634b77d8..6a09aa0e 100644
--- a/unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml
+++ b/unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml
@@ -147,6 +147,10 @@
 	operation on the surface.  This will override any kind of output
 	scaling, so the buffer_scale property of the surface is effectively
 	ignored.
+
+	This request gives the surface the role of a fullscreen shell surface.
+	If the surface already has another role, it raises a role protocol
+	error.
       </description>
       <arg name="surface" type="object" interface="wl_surface" allow-null="true"/>
       <arg name="method" type="uint" enum="present_method" />
@@ -192,6 +196,10 @@
 	then the compositor may choose a mode that matches either the buffer
 	size or the surface size.  In either case, the surface will fill the
 	output.
+
+	This request gives the surface the role of a fullscreen shell surface.
+	If the surface already has another role, it raises a role protocol
+	error.
       </description>
       <arg name="surface" type="object" interface="wl_surface"/>
       <arg name="output" type="object" interface="wl_output"/>
@@ -204,6 +212,7 @@
 	These errors can be emitted in response to wl_fullscreen_shell requests.
       </description>
       <entry name="invalid_method" value="0" summary="present_method is not known"/>
+      <entry name="role" value="1" summary="given wl_surface has another role"/>
     </enum>
   </interface>
 
-- 
GitLab