[Xcb] [PATCH proto 05/22 V2] xinput: req GrabDeviceKey.modifier_device: altenum

Christian Linhart chris at DemoRecorder.com
Fri Aug 22 08:15:24 PDT 2014

add altenum ModifierDevice to field modifier_device for value UseXKeyboard

V2: patch revised according to info from Ran Benita about NULL and UseXKeyboard

spec and code:

the following spec uses "NULL" instead of "UseXKeyboard":

The reason for NULL vs UseXKeyboard is: in the libXi function XUngrabDeviceKey, 
the modifier_device arg is an XDevice pointer, and NULL means to use the
core X keyboard. But on the wire it is an integer, with 255 as a special

 src/xinput.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xinput.xml b/src/xinput.xml
index 1bfa257..91fcecf 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -364,15 +364,15 @@ <enum name="ModifierDevice">
 	<item name="UseXKeyboard"><value>255</value></item> <!-- 0xff -->
     <request name="GrabDeviceKey" opcode="15">
         <field type="WINDOW" name="grab_window" />
         <field type="CARD16" name="num_classes" />
         <field type="CARD16" name="modifiers" mask="ModMask" />
-        <field type="CARD8"  name="modifier_device" />
+        <field type="CARD8"  name="modifier_device" altenum="ModifierDevice" />
         <field type="CARD8"  name="grabbed_device" />
         <field type="CARD8"  name="key" altenum="Grab" />
         <field type="CARD8"  name="this_device_mode" enum="GrabMode" />
         <field type="CARD8"  name="other_device_mode" enum="GrabMode" />
         <field type="BOOL"   name="owner_events" />
         <pad bytes="2" />
         <list type="EventClass" name="classes">
-- 2.0.1

More information about the Xcb mailing list