[Xcb] [PATCH proto 02/22] xinput: rep ChangeKeyboardDevice.status: altenum to enum

Christian Linhart chris at demorecorder.com
Mon Aug 18 05:59:42 PDT 2014


Field "status" can only get values from enum GrabStatus
therefore make it an enum instead of altenum.

spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n1016

Add comment about valid values for field status.

Note:
An old spec lists value 2 for enum value "Frozen"
while enum GrabStatus has value 4 for Frozen.
The old spec is probably wrong.
Here is the URL of the old spec:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1044
---
 src/xinput.xml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/xinput.xml b/src/xinput.xml
index 2583036..4785cf8 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -300,15 +300,18 @@ <request name="GetDeviceMotionEvents" opcode="10">
     <!-- ChangeKeyboardDevice -->
 
     <request name="ChangeKeyboardDevice" opcode="11">
         <field type="CARD8" name="device_id" />
         <pad bytes="3" />
         <reply>
             <pad bytes="1" />
-            <field type="CARD8" name="status" altenum="GrabStatus" />
+            <!-- only the following GrabStatus-values are valid here:
+                 "Success", "AlreadyGrabbed", and "Frozen" 
+            -->
+            <field type="CARD8" name="status" enum="GrabStatus" />
             <pad bytes="23" />
         </reply>
     </request>
 
     <!-- ChangePointerDevice -->
 
     <request name="ChangePointerDevice" opcode="12">
-- 
2.0.1



More information about the Xcb mailing list