[1/2] protocol: Add error enum to wl_registry

Submitted by Philipp Kerling on Jan. 22, 2018, 12:32 p.m.

Details

Message ID 20180122123231.9951-1-pkerling@casix.org
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Wayland

Not browsing as part of any series.

Commit Message

Philipp Kerling Jan. 22, 2018, 12:32 p.m.
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(+)

Patch hide | download patch | download mbox

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