[PATCH weston 2/4] protocol: add role error code to xdg_shell

Pekka Paalanen ppaalanen at gmail.com
Wed Oct 1 06:50:26 PDT 2014


From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

Needed for properly reporting role violations from
xdg_shell.get_xdg_surface and .get_xdg_popup.

Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
 protocol/xdg-shell.xml | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/protocol/xdg-shell.xml b/protocol/xdg-shell.xml
index 275837f..776438b 100644
--- a/protocol/xdg-shell.xml
+++ b/protocol/xdg-shell.xml
@@ -48,6 +48,9 @@
       <entry name="current" value="4" summary="Always the latest version"/>
     </enum>
 
+    <enum name="error">
+      <entry name="role" value="0" summary="given wl_surface has another role"/>
+    </enum>
 
     <request name="use_unstable_version">
       <description summary="enable use of this unstable version">
@@ -64,6 +67,9 @@
       <description summary="create a shell surface from a surface">
 	Create a shell surface for an existing surface.
 
+	This request gives the surface the role of xdg_surface. If the
+	surface already has another role, it raises a protocol error.
+
 	Only one shell or popup surface can be associated with a given
 	surface.
       </description>
@@ -75,6 +81,9 @@
       <description summary="create a shell surface from a surface">
 	Create a popup surface for an existing surface.
 
+	This request gives the surface the role of xdg_popup. If the
+	surface already has another role, it raises a protocol error.
+
 	Only one shell or popup surface can be associated with a given
 	surface.
       </description>
-- 
1.8.5.5



More information about the wayland-devel mailing list