[Xcb] [PATCH proto 16/22 V2] xinput: new enum for device_id in some events

Christian Linhart chris at DemoRecorder.com
Tue Aug 19 04:13:06 PDT 2014

add new enum "MoreEventsMask" to be used
by event DeviceKeyPress and derived ones
for field "device_id".

V2: patch revised according to suggestion from Peter Harris:
* remove DeviceBits = 0x7f from the enum in order to avoid 
  mixing bit and value in the same enum.
  ( We'd need a way to specify a range of bits for that ... )

spec and code:

this mask is missing in the following spec:
 src/xinput.xml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/xinput.xml b/src/xinput.xml
index 923db96..cc47694 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -1825,14 +1825,20 @@ <event name="DeviceValuator" number="0">
         <field type="CARD8"  name="num_valuators" />
         <field type="CARD8"  name="first_valuator" />
         <list type="INT32"   name="valuators">
+    <!-- the highest bit in a CARD8 device_id-field indicates that more
+	events will follow -->
+    <enum name="MoreEventsMask">
+	<item name="MoreEvents"> <bit>7</bit> </item> <!-- 0x80 -->
+    </enum>
     <event name="DeviceKeyPress" number="1">
         <field type="BYTE"      name="detail" />
         <field type="TIMESTAMP" name="time" />
         <field type="WINDOW"    name="root" />
         <field type="WINDOW"    name="event" />
         <field type="WINDOW"    name="child" altenum="Window" />
         <field type="INT16"     name="root_x" />
-- 2.0.1 

More information about the Xcb mailing list