xinput: rep SetDeviceMode.status: altenum to enum
authorChristian Linhart <chris@demorecorder.com>
Mon, 18 Aug 2014 14:41:21 +0000 (16:41 +0200)
committerChristian Linhart <chris@demorecorder.com>
Mon, 25 Aug 2014 11:42:56 +0000 (13:42 +0200)
commit3e6ddac96fb562c8675343d32fb25a2f6e3de17d
tree527a7a640fb5885133276895eaf1c0cc740380c0
parent36484e600c803b214a12f60c94fe81e4dc78980f
xinput: rep SetDeviceMode.status: altenum to enum

Field "status" of the SetDeviceMode-reply
only allows values from enum GrabStatus.

Therefore it has an "enum" and not an "altenum".

Also: Add comment about valid values of field "status".

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

note:
The following spec also mentions value "3 + first_error":
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n891

This is probably an error in this old spec because:
* the X-Server code does not generate that value.
  In case of error-codes, it does the following:
  instead of sending the reply it returns
  rep.status containing the error-code as returnvalue
  of the function ProcXSetDeviceMode.
  This will probably cause the sending of an XError.
  code:
    http://cgit.freedesktop.org/xorg/xserver/tree/Xi/setmode.c#n86

* the new spec does not mention that value:
  http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n601
src/xinput.xml