xinput: ev DeviceKeyPress.device_id: add mask
authorChristian Linhart <chris@DemoRecorder.com>
Tue, 19 Aug 2014 11:13:24 +0000 (13:13 +0200)
committerChristian Linhart <chris@demorecorder.com>
Mon, 25 Aug 2014 11:42:56 +0000 (13:42 +0200)
for event DeviceKeyPress and derived ones:
add new mask "MoreEventsMask" to field "device_id"

V2: patch revised according to suggestion from Peter Harris:
* use "altmask" instead of "mask"
  because all the legal values of device_id are not described
  by the <bit> elements of MoreEventsMask.

spec and code:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1999
http://cgit.freedesktop.org/xorg/lib/libXi/tree/src/XExtInt.c#n534
http://cgit.freedesktop.org/xorg/xserver/tree/dix/eventconvert.c#n348
http://cgit.freedesktop.org/xorg/xserver/tree/Xi/exevents.c#n188

note:
this mask is missing in the following spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n2257

src/xinput.xml

index 179735f..7b7b948 100644 (file)
@@ -1847,7 +1847,7 @@ authorization from the authors.
         <field type="INT16"     name="event_y" />
         <field type="CARD16"    name="state" mask="KeyButMask" />
         <field type="BOOL"      name="same_screen" />
-        <field type="CARD8"     name="device_id" />
+        <field type="CARD8"     name="device_id" altmask="MoreEventsMask" />
     </event>
 
     <eventcopy name="DeviceKeyRelease"    number="2" ref="DeviceKeyPress" />