As an oversight, wl_registry did not define any errors. At least error 0
is already being sent by libwayland-server although it is - strictly
speaking - undefined.

Define error 0 to be an invalid global which is also a sort of catch-all
error code. Errors 1 (invalid version) and 2 (incompatible version) can
provide further insight into the reason the bind failed and might be
useful for test-suites.
---
 protocol/wayland.xml | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index b5662e0..55a8c6f 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -132,6 +132,15 @@
       the object.
     </description>
 
+    <enum name="error">
+      <description summary="wl_registry error values">
+       These errors can be emitted in response to wl_registry requests.
+      </description>
+      <entry name="invalid_global" value="0" summary="requested global is 
unknown or unavailable to the client"/>
+      <entry name="invalid_version" value="1" summary="an invalid version was 
requested"/>
+      <entry name="incompatible_version" value="2" summary="requested version 
constraint cannot be satisfied"/>
+    </enum>
+
     <request name="bind">
       <description summary="bind an object to the display">
        Binds a new, client-created object to the server using the
-- 
2.15.1

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to