xinput: rep ChangePointerDevice.status: altenum to enum
authorChristian Linhart <chris@demorecorder.com>
Mon, 18 Aug 2014 12:59:43 +0000 (14:59 +0200)
committerChristian Linhart <chris@demorecorder.com>
Mon, 25 Aug 2014 11:42:55 +0000 (13:42 +0200)
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#n1055

Add comments:
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#n1073

src/xinput.xml

index 51a5a5d..b30cf19 100644 (file)
@@ -321,7 +321,10 @@ authorization from the authors.
         <pad bytes="1" />
         <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>