[Xcb] [RFC PATCH proto] XKB-fixes (preliminary version)

Christian Linhart chris at demorecorder.com
Sat Mar 14 03:44:01 PDT 2015


This is an informal patch ( not to be merged ) to show
what I have found in XKB.

Among other things, the following probably needs to be done:
* some changes in the generator
  - support structs with only varsized fields
    Currently, this generates an empty C-struct.
    I have once made a patch for that, but I need to adapt it to
    current upstream.

  - Maybe support size of var-sized unions.
    Or better: we replace the unions by switch-case, see further below.
    Var-sized unions are hard because there is no
    definition which union field to choose.
    (just possibly heuristics but that's ugly)

  - ...

* event numbers work differently in XKB than in other extensios.
  This should be reflected by the XML.

* replace unions by switch-case. Especially Doodad.
  Unions are deprecated and they do not fully describe the protocol
  because there is no info in the XML which union field to choose.
  We need switch-case anyways for replacing unions with var-sized members.

* testing
  (I have only tested with my own generator, not with libxcb)

* review against the spec and xlib/xserver implementation.

* review ABI/API compatibility with respect to usage in
  important software like QT.
  Then decide whether to make a second version of XKB support.

* ...
---
 src/xkb.xml | 258 ++++++++++++++++++++++++++++++++++++------------------------
 1 file changed, 154 insertions(+), 104 deletions(-)

diff --git a/src/xkb.xml b/src/xkb.xml
index ad52ea2..be92ebd 100644
--- a/src/xkb.xml
+++ b/src/xkb.xml
@@ -67,14 +67,19 @@ <enum name="AXNDetail">
 		<item name="SKReject">     <bit>2</bit> </item>
 		<item name="SKRelease">    <bit>3</bit> </item>
 		<item name="BKAccept">     <bit>4</bit> </item>
 		<item name="BKReject">     <bit>5</bit> </item>
 		<item name="AXKWarning">   <bit>6</bit> </item>
 	</enum>
 
+	<!-- each bit corresponds to an indicator -->
+	<typedef oldname="CARD32" newname="SetOfIndicator" />
+
+	<typedef oldname="CARD8" newname="Indicator" />
+
 	<enum name="MapPart">
 		<item name="KeyTypes">            <bit>0</bit> </item>
 		<item name="KeySyms">             <bit>1</bit> </item>
 		<item name="ModifierMap">         <bit>2</bit> </item>
 		<item name="ExplicitComponents">  <bit>3</bit> </item>
 		<item name="KeyActions">          <bit>4</bit> </item>
 		<item name="KeyBehaviors">        <bit>5</bit> </item>
@@ -118,15 +123,29 @@ <enum name="BoolCtrl">
 		<item name="Overlay1Mask">         <bit>10</bit> </item>
 		<item name="Overlay2Mask">         <bit>11</bit> </item>
 		<item name="IgnoreGroupLockMask">  <bit>12</bit> </item>
 	</enum>
 
 	<!-- XXX: one zero less than XKB specification says,
 	          uses the same values as libX11 -->
+	<!-- values of BoolCtrl are included here according to spec appendix D -->
 	<enum name="Control" >
+		<item name="RepeatKeys">           <bit>0</bit> </item>
+		<item name="SlowKeys">             <bit>1</bit> </item>
+		<item name="BounceKeys">           <bit>2</bit> </item>
+		<item name="StickyKeys">           <bit>3</bit> </item>
+		<item name="MouseKeys">            <bit>4</bit> </item>
+		<item name="MouseKeysAccel">       <bit>5</bit> </item>
+		<item name="AccessXKeys">          <bit>6</bit> </item>
+		<item name="AccessXTimeoutMask">   <bit>7</bit> </item>
+		<item name="AccessXFeedbackMask">  <bit>8</bit> </item>
+		<item name="AudibleBellMask">      <bit>9</bit> </item>
+		<item name="Overlay1Mask">         <bit>10</bit> </item>
+		<item name="Overlay2Mask">         <bit>11</bit> </item>
+		<item name="IgnoreGroupLockMask">  <bit>12</bit> </item>
 		<item name="GroupsWrap">      <bit>27</bit> </item>
 		<item name="InternalMods">    <bit>28</bit> </item>
 		<item name="IgnoreLockMods">  <bit>29</bit> </item>
 		<item name="PerKeyRepeat">    <bit>30</bit> </item>
 		<item name="ControlsEnabled"> <bit>31</bit> </item>
 	</enum>
 
@@ -141,14 +160,16 @@ <enum name="AXOption">
 		<item name="LatchToLock">   <bit>7</bit> </item>
 		<item name="SKReleaseFB">   <bit>8</bit> </item>
 		<item name="SKRejectFB">    <bit>9</bit> </item>
 		<item name="BKRejectFB">    <bit>10</bit> </item>
 		<item name="DumbBell">      <bit>11</bit> </item>
 	</enum>
 
+	<!-- this is the same as DeviceId from xinput.
+		Maybe import xinput and use this here? -->
 	<typedef oldname="CARD16" newname="DeviceSpec" />
 
 	<enum name="LedClassResult">
 		<item name="KbdFeedbackClass"> <value>0</value> </item>
 		<item name="LedFeedbackClass"> <value>4</value> </item>
 	</enum>
 
@@ -186,31 +207,54 @@ <enum name="ID">
 	<enum name="Group">
 		<item name="1"> <value>0</value> </item>
 		<item name="2"> <value>1</value> </item>
 		<item name="3"> <value>2</value> </item>
 		<item name="4"> <value>3</value> </item>
 	</enum>
 
+	<!-- values of Group are included here according to spec appendix D -->
 	<enum name="Groups">
+		<item name="1"> <value>0</value> </item>
+		<item name="2"> <value>1</value> </item>
+		<item name="3"> <value>2</value> </item>
+		<item name="4"> <value>3</value> </item>
 		<item name="Any"> <value>254</value> </item>
 		<item name="All"> <value>255</value> </item>
 	</enum>
 
 	<enum name="SetOfGroup">
 		<item name="Group1"> <bit>0</bit> </item>
 		<item name="Group2"> <bit>1</bit> </item>
 		<item name="Group3"> <bit>2</bit> </item>
 		<item name="Group4"> <bit>3</bit> </item>
 	</enum>
 
+	<!-- values of SetOfGroup are included here according to spec appendix D -->
 	<enum name="SetOfGroups">
+		<item name="Group1"> <bit>0</bit> </item>
+		<item name="Group2"> <bit>1</bit> </item>
+		<item name="Group3"> <bit>2</bit> </item>
+		<item name="Group4"> <bit>3</bit> </item>
 		<item name="Any"> <bit>7</bit> </item>
 	</enum>
 
+	<!-- GroupsWrap or GroupInfo:
+		according to XKBstr.h and other xkb code
+		such as function XkbLookupGroupAndLevel in XServer/xkb/xkbfmisc.c
+			bits 0..3 : NumGroups,
+			bits 4..5 : OutOfRangeGroupNumber ( used when flag RedirectIntoRange is set )
+			bits 6..7 : OutOfRangeGroupAction:
+				only bit 6 set: ClampIntoRange
+				only bit 7 set: RedirectIntoRange
+				none of bits 6 and 7 set: WrapIntoRange
+	-->
 	<enum name="GroupsWrap">
+		<item name="NumGroupsMask"> 	<value>15</value> </item> <!-- 0x0f, bits 0..3: -->
+		<item name="OutOfRangeGroupNumberMask"> <value>48</value> </item> <!-- 0x30, bits 4..5 -->
+		<item name="OutOfRangeGroupActionMask"> <value>192</value> </item> <!-- 0xc0, bits 6..7 -->
 		<item name="WrapIntoRange">     <value>0</value> </item>
 		<item name="ClampIntoRange">    <bit>6</bit> </item>
 		<item name="RedirectIntoRange"> <bit>7</bit> </item>
 	</enum>
 
 	<enum name="VModsHigh">
 		<item name="15"> <bit>7</bit> </item>
@@ -347,14 +391,23 @@ <enum name="XIFeature">
 		<item name="Keyboards">      <bit>0</bit> </item>
 		<item name="ButtonActions">  <bit>1</bit> </item>
 		<item name="IndicatorNames"> <bit>2</bit> </item>
 		<item name="IndicatorMaps">  <bit>3</bit> </item>
 		<item name="IndicatorState"> <bit>4</bit> </item>
 	</enum>
 
+	<enum name="XIDetail">
+		<item name="Keyboards">      <bit>0</bit> </item>
+		<item name="ButtonActions">  <bit>1</bit> </item>
+		<item name="IndicatorNames"> <bit>2</bit> </item>
+		<item name="IndicatorMaps">  <bit>3</bit> </item>
+		<item name="IndicatorState"> <bit>4</bit> </item>
+		<item name="UnsupportedFeature"> <bit>15</bit> </item>
+	</enum>
+
 	<enum name="PerClientFlag">
 		<item name="DetectableAutoRepeat">   <bit>0</bit> </item>
 		<item name="GrabsUseXKBState">       <bit>1</bit> </item>
 		<item name="AutoResetControls">      <bit>2</bit> </item>
 		<item name="LookupStateWhenGrabbed"> <bit>3</bit> </item>
 		<item name="SendEventUsesXKBState">  <bit>4</bit> </item>
 	</enum>
@@ -381,14 +434,15 @@ <struct name="KeyAlias">
 	</struct>
 
 	<struct name="CountedString16">
 		<field name="length" type="CARD16" />
 		<list name="string" type="char">
 			<fieldref>length</fieldref>
 		</list>
+		<!-- can this be replaced by <pad align="4"/> ? -->
 		<list type="void" name="alignment_pad">
 			<op op="-">
 				<op op="&">
 					<op op="+">
 						<fieldref>length</fieldref>
 						<value>5</value>
 					</op>
@@ -432,43 +486,57 @@ <struct name="KeyType">
 		</list>
 	</struct>
 
 	<struct name="KeySymMap">
 		<list name="kt_index" type="CARD8">
 			<value>4</value>
 		</list>
-		<field name="groupInfo" type="CARD8" />
+		<field name="groupInfo" type="CARD8" mask="GroupsWrap" />
 		<field name="width" type="CARD8" />
 		<field name="nSyms" type="CARD16" />
 		<list name="syms" type="KEYSYM">
 			<fieldref>nSyms</fieldref>
 		</list>
 	</struct>
 
 	<!-- Key Behaviors -->
 
+	<enum name="BehaviorType">
+		<item name="Default">             <value>0</value> </item>	<!--0x00-->
+		<item name="Lock">                <value>1</value> </item>	<!--0x01-->
+		<item name="RadioGroup">          <value>2</value> </item>	<!--0x02-->
+		<item name="Overlay1">            <value>3</value> </item>	<!--0x03-->
+		<item name="Overlay2">            <value>4</value> </item>	<!--0x04-->
+		<item name="PermamentLock">       <value>129</value> </item>	<!--0x81-->
+		<item name="PermamentRadioGroup"> <value>130</value> </item>	<!--0x82-->
+		<item name="PermamentOverlay1">   <value>131</value> </item>	<!--0x83-->
+		<item name="PermamentOverlay2">   <value>132</value> </item>	<!--0x84-->
+	</enum>
+
 	<struct name="CommonBehavior">
-		<field name="type" type="CARD8" />
+		<field name="type" type="CARD8" enum="BehaviorType" />
 		<field name="data" type="CARD8" />
 	</struct>
 
 	<struct name="DefaultBehavior">
-		<field name="type" type="CARD8" />
+		<field name="type" type="CARD8" enum="BehaviorType" />
 		<pad bytes="1" />
 	</struct>
 
 	<typedef oldname="DefaultBehavior" newname="LockBehavior" />
 
+	<typedef oldname="CARD8" newname="RadioGroup" />
+
 	<struct name="RadioGroupBehavior">
-		<field name="type" type="CARD8" />
-		<field name="group" type="CARD8" />
+		<field name="type" type="CARD8" enum="BehaviorType" />
+		<field name="group" type="RadioGroup" />
 	</struct>
 
 	<struct name="OverlayBehavior">
-		<field name="type" type="CARD8" />
+		<field name="type" type="CARD8" enum="BehaviorType" />
 		<field name="key" type="KEYCODE" />
 	</struct>
 
 	<typedef oldname="LockBehavior" newname="PermamentLockBehavior" />
 	<typedef oldname="RadioGroupBehavior" newname="PermamentRadioGroupBehavior" />
 	<typedef oldname="OverlayBehavior" newname="PermamentOverlayBehavior" />
 
@@ -479,28 +547,17 @@ <union name="Behavior">
 		<field name="radioGroup" type="RadioGroupBehavior" />
 		<field name="overlay1" type="OverlayBehavior" />
 		<field name="overlay2" type="OverlayBehavior" />
 		<field name="permamentLock" type="PermamentLockBehavior" />
 		<field name="permamentRadioGroup" type="PermamentRadioGroupBehavior" />
 		<field name="permamentOverlay1" type="PermamentOverlayBehavior" />
 		<field name="permamentOverlay2" type="PermamentOverlayBehavior" />
-		<field name="type" type="CARD8" />
+		<field name="type" type="CARD8" enum="BehaviorType" />
 	</union>
 
-	<enum name="BehaviorType">
-		<item name="Default">             <value>0</value> </item>	<!--0x00-->
-		<item name="Lock">                <value>1</value> </item>	<!--0x01-->
-		<item name="RadioGroup">          <value>2</value> </item>	<!--0x02-->
-		<item name="Overlay1">            <value>3</value> </item>	<!--0x03-->
-		<item name="Overlay2">            <value>4</value> </item>	<!--0x04-->
-		<item name="PermamentLock">       <value>129</value> </item>	<!--0x81-->
-		<item name="PermamentRadioGroup"> <value>130</value> </item>	<!--0x82-->
-		<item name="PermamentOverlay1">   <value>131</value> </item>	<!--0x83-->
-		<item name="PermamentOverlay2">   <value>132</value> </item>	<!--0x84-->
-	</enum>
 
 	<struct name="SetBehavior">
 		<field name="keycode" type="KEYCODE" />
 		<field name="behavior" type="Behavior" />
 		<pad bytes="1" />
 	</struct>
 
@@ -543,34 +600,27 @@ <struct name="SetKeyType">
 			<fieldref>nMapEntries</fieldref>
 		    </op>
 		</list>
 	</struct>
 
 	<typedef oldname="char" newname="STRING8" />
 
-	<!-- XXX: Property is broken
-	<struct name="Property">
-		<field name="nameLength" type="CARD16" />
-		<list name="name" type="STRING8">
-			<fieldref>nameLength</fieldref>
-		</list>
-		<field name="valueLength" type="CARD16" />
-		<list name="value" type="STRING8">
-			<fieldref>valueLength</fieldref>
-		</list>
-	</struct>
+	<!-- the appendix D of the spec lists these strings without final 
+	     padding of CountedString16, but Xlib does the padding
+	     see function
+		_XkbReadGetGeometryReply which calls function
+		_XkbReadGeomProperties which calls function
+		_XkbGetReadBufferCountedString which uses macro
+		XkbPaddedSize which computes the padding.
+	     so using CountedString16 seems to be OK here.
 	-->
-	<!-- XXX: This would be the correct Property structure as per spec.,
-		  but it's broken atm. too. Add it anyway here, so we don't
-		  loose that information.
 	<struct name="Property">
 		<field name="name" type="CountedString16" />
 		<field name="value" type="CountedString16" />
 	</struct>
-	-->
 
 	<struct name="Outline">
 		<field name="nPoints" type="CARD8" />
 		<field name="cornerRadius" type="CARD8" />
 		<pad bytes="2" />
 		<list name="points" type="POINT">
 			<fieldref>nPoints</fieldref>
@@ -639,15 +689,14 @@ <enum name="DoodadType">
 		<item name="Outline">   <value>1</value> </item>
 		<item name="Solid">     <value>2</value> </item>
 		<item name="Text">      <value>3</value> </item>
 		<item name="Indicator"> <value>4</value> </item>
 		<item name="Logo">      <value>5</value> </item>
 	</enum>
 
-	<!-- XXX: doodads are broken
 	<struct name="CommonDoodad">
 		<field name="name" type="ATOM" />
 		<field name="type" type="CARD8" enum="DoodadType" />
 		<field name="priority" type="CARD8" />
 		<field name="top" type="INT16" />
 		<field name="left" type="INT16" />
 		<field name="angle" type="INT16" />
@@ -703,14 +752,19 @@ <struct name="LogoDoodad">
 		<field name="angle" type="INT16" />
 		<field name="colorNdx" type="CARD8" />
 		<field name="shapeNdx" type="CARD8" />
 		<pad bytes="6" />
 		<field name="logoName" type="CountedString16" />
 	</struct>
 
+	<!-- this union has a variable size, depending on which field is chosen.
+		the current XCB-code-generator does not support that.
+		plus: there needs to be an explicit field-selection specification in the XML before
+		the generator will be able to handle that. This is not yet possible
+		with the current XCB XML-spec -->
 	<union name="Doodad">
 		<field name="common" type="CommonDoodad" />
 		<field name="shape" type="ShapeDoodad" />
 		<field name="text" type="TextDoodad" />
 		<field name="indicator" type="IndicatorDoodad" />
 		<field name="logo" type="LogoDoodad" />
 	</union>
@@ -733,31 +787,31 @@ <struct name="Section">
 		<list name="doodads" type="Doodad">
 			<fieldref>nDoodads</fieldref>
 		</list>
 		<list name="overlays" type="Overlay">
 			<fieldref>nOverlays</fieldref>
 		</list>
 	</struct>
-	-->
 
 	<struct name="Listing">
 		<field name="flags" type="CARD16" />
 		<field name="length" type="CARD16" />
 		<list name="string" type="STRING8">
 			<fieldref>length</fieldref>
 		</list>
+		<pad align="2" />
 	</struct>
 
 	<struct name="DeviceLedInfo">
 		<field name="ledClass" type="LedClassSpec" enum="LedClass" />
 		<field name="ledID" type="IDSpec" altenum="ID" />
-		<field name="namesPresent" type="CARD32" />
-		<field name="mapsPresent" type="CARD32" />
-		<field name="physIndicators" type="CARD32" />
-		<field name="state" type="CARD32" />
+		<field name="namesPresent" type="SetOfIndicator" />
+		<field name="mapsPresent" type="SetOfIndicator" />
+		<field name="physIndicators" type="SetOfIndicator" />
+		<field name="state" type="SetOfIndicator" />
 		<list name="names" type="ATOM">
 			<popcount>
 				<fieldref>namesPresent</fieldref>
 			</popcount>
 		</list>
 		<list name="maps" type="IndicatorMap">
 			<popcount>
@@ -832,15 +886,15 @@ <struct name="SASetMods">
 	<typedef oldname="SASetMods" newname="SALatchMods" />
 
 	<typedef oldname="SASetMods" newname="SALockMods" />
 
 	<struct name="SASetGroup">
 		<field name="type" type="CARD8" enum="SAType" />
 		<field name="flags" type="CARD8" mask="SA" />
-		<field name="group" type="INT8" />
+		<field name="group" type="INT8" enum="Group" />
 		<pad bytes="5" />
 	</struct>
 
 	<typedef oldname="SASetGroup" newname="SALatchGroup" />
 
 	<typedef oldname="SASetGroup" newname="SALockGroup" />
 
@@ -906,15 +960,15 @@ <enum name="SAIsoLockNoAffect">
 	</enum>
 
 	<struct name="SAIsoLock">
 		<field name="type" type="CARD8" enum="SAType" />
 		<field name="flags" type="CARD8" mask="SAIsoLockFlag" />
 		<field name="mask" type="CARD8" mask="ModMask" />
 		<field name="realMods" type="CARD8" mask="ModMask" />
-		<field name="group" type="INT8" />
+		<field name="group" type="INT8" enum="Group" />
 		<field name="affect" type="CARD8" mask="SAIsoLockNoAffect" />
 		<field name="vmodsHigh" type="CARD8" mask="VModsHigh" />
 		<field name="vmodsLow" type="CARD8" mask="VModsLow" />
 	</struct>
 
 	<struct name="SATerminate">
 		<field name="type" type="CARD8" enum="SAType" />
@@ -967,15 +1021,15 @@ <enum name="ActionMessageFlag">
 		<item name="OnRelease">   <bit>1</bit> </item>
 		<item name="GenKeyEvent"> <bit>2</bit> </item>
 	</enum>
 
 	<struct name="SAActionMessage">
 		<field name="type" type="CARD8" enum="SAType" />
 		<field name="flags" type="CARD8" mask="ActionMessageFlag" />
-		<list name="message" type="CARD8">
+		<list name="message" type="char">
 			<value>6</value>
 		</list>
 	</struct>
 
 	<struct name="SARedirectKey">
 		<field name="type" type="CARD8" enum="SAType" />
 		<field name="newkey" type="KEYCODE" />
@@ -1113,21 +1167,21 @@ <request name="SelectEvents" opcode="1">
 			<bitcase>
 				<enumref ref="EventType">ControlsNotify</enumref>
 				<field name="affectCtrls" type="CARD32" mask="Control" />
 				<field name="ctrlDetails" type="CARD32" mask="Control" />
 			</bitcase>
 			<bitcase>
 				<enumref ref="EventType">IndicatorStateNotify</enumref>
-				<field name="affectIndicatorState" type="CARD32" />
-				<field name="indicatorStateDetails" type="CARD32" />
+				<field name="affectIndicatorState" type="SetOfIndicator" />
+				<field name="indicatorStateDetails" type="SetOfIndicator" />
 			</bitcase>
 			<bitcase>
 				<enumref ref="EventType">IndicatorMapNotify</enumref>
-				<field name="affectIndicatorMap" type="CARD32" />
-				<field name="indicatorMapDetails" type="CARD32" />
+				<field name="affectIndicatorMap" type="SetOfIndicator" />
+				<field name="indicatorMapDetails" type="SetOfIndicator" />
 			</bitcase>
 			<bitcase>
 				<enumref ref="EventType">NamesNotify</enumref>
 				<field name="affectNames" type="CARD16" mask="NameDetail" />
 				<field name="namesDetails" type="CARD16" mask="NameDetail" />
 			</bitcase>
 			<bitcase>
@@ -1148,16 +1202,16 @@ <request name="SelectEvents" opcode="1">
 			<bitcase>
 				<enumref ref="EventType">AccessXNotify</enumref>
 				<field name="affectAccessX" type="CARD16" mask="AXNDetail" />
 				<field name="accessXDetails" type="CARD16" mask="AXNDetail" />
 			</bitcase>
 			<bitcase>
 				<enumref ref="EventType">ExtensionDeviceNotify</enumref>
-				<field name="affectExtDev" type="CARD16" mask="XIFeature" />
-				<field name="extdevDetails" type="CARD16" mask="XIFeature" />
+				<field name="affectExtDev" type="CARD16" mask="XIDetail" />
+				<field name="extdevDetails" type="CARD16" mask="XIDetail" />
 			</bitcase>
 		</switch>
 	</request>
 
 	<request name="Bell" opcode="3">
 		<field name="deviceSpec" type="DeviceSpec" />
 		<field name="bellClass" type="BellClassSpec" />
@@ -1180,16 +1234,16 @@ <request name="GetState" opcode="4">
 			<field name="deviceID" type="CARD8" />
 			<field name="mods" type="CARD8" mask="ModMask" />
 			<field name="baseMods" type="CARD8" mask="ModMask" />
 			<field name="latchedMods" type="CARD8" mask="ModMask" />
 			<field name="lockedMods" type="CARD8" mask="ModMask" />
 			<field name="group" type="CARD8" enum="Group" />
 			<field name="lockedGroup" type="CARD8" enum="Group" />
-			<field name="baseGroup" type="INT16" />
-			<field name="latchedGroup" type="INT16" />
+			<field name="baseGroup" type="INT16" enum="Group" />
+			<field name="latchedGroup" type="INT16" enum="Group" />
 			<field name="compatState" type="CARD8" mask="ModMask" />
 			<field name="grabMods" type="CARD8" mask="ModMask" />
 			<field name="compatGrabMods" type="CARD8" mask="ModMask" />
                         <field name="lookupMods" type="CARD8" mask="ModMask" />
 			<field name="compatLookupMods" type="CARD8" mask="ModMask" />
 			<pad bytes="1" />
 			<field name="ptrBtnState" type="CARD16" mask="KeyButMask" />
@@ -1200,31 +1254,28 @@ <request name="GetState" opcode="4">
 	<request name="LatchLockState" opcode="5">
 		<field name="deviceSpec" type="DeviceSpec" />
 		<field name="affectModLocks" type="CARD8" mask="ModMask" />
 		<field name="modLocks" type="CARD8" mask="ModMask" />
 		<field name="lockGroup" type="BOOL" />
 		<field name="groupLock" type="CARD8" enum="Group" />
 		<field name="affectModLatches" type="CARD8" mask="ModMask" />
-		<pad bytes="1" /> <!-- This pad is a workaround to prevent an API break,
-		                       which the following field (correct fix) would cause.
 		<field name="modLatches" type="CARD8" mask="ModMask" />
-		-->
 		<pad bytes="1" />
 		<field name="latchGroup" type="BOOL" />
 		<field name="groupLatch" type="CARD16" />
 	</request>
 
 	<request name="GetControls" opcode="6">
 		<field name="deviceSpec" type="DeviceSpec" />
 		<pad bytes="2" />
 		<reply>
 			<field name="deviceID" type="CARD8" />
 			<field name="mouseKeysDfltBtn" type="CARD8" />
 			<field name="numGroups" type="CARD8" />
-			<field name="groupsWrap" type="CARD8" />
+			<field name="groupsWrap" type="CARD8" mask="GroupsWrap" />
 			<field name="internalModsMask" type="CARD8" mask="ModMask" />
 			<field name="ignoreLockModsMask" type="CARD8" mask="ModMask" />
 			<field name="internalModsRealMods" type="CARD8" mask="ModMask" />
 			<field name="ignoreLockModsRealMods" type="CARD8" mask="ModMask" />
 			<pad bytes="1" />
 			<field name="internalModsVmods" type="CARD16" mask="VMod" />
 			<field name="ignoreLockModsVmods" type="CARD16" mask="VMod" />
@@ -1258,15 +1309,15 @@ <request name="SetControls" opcode="7">
 		<field name="affectIgnoreLockRealMods" type="CARD8" mask="ModMask" />
 		<field name="ignoreLockRealMods" type="CARD8" mask="ModMask" />
 		<field name="affectInternalVirtualMods" type="CARD16" mask="VMod" />
 		<field name="internalVirtualMods" type="CARD16" mask="VMod" />
 		<field name="affectIgnoreLockVirtualMods" type="CARD16" mask="VMod" />
 		<field name="ignoreLockVirtualMods" type="CARD16" mask="VMod" />
 		<field name="mouseKeysDfltBtn" type="CARD8" />
-		<field name="groupsWrap" type="CARD8" />
+		<field name="groupsWrap" type="CARD8" mask="GroupsWrap" />
 		<field name="accessXOptions" type="CARD16" mask="AXOption" />
 		<pad bytes="2" />
 		<field name="affectEnabledControls" type="CARD32" mask="BoolCtrl" />
 		<field name="enabledControls" type="CARD32" mask="BoolCtrl" />
 		<field name="changeControls" type="CARD32" mask="Control" />
 		<field name="repeatDelay" type="CARD16" />
 		<field name="repeatInterval" type="CARD16" />
@@ -1439,41 +1490,45 @@ <request name="SetMap" opcode="9">
 				</list>
 			</bitcase>
 			<bitcase>
 				<enumref ref="MapPart">KeyActions</enumref>
 				<list name="actionsCount" type="CARD8">
 					<fieldref>nKeyActions</fieldref>
 				</list>
+				<pad align="4" />
 				<list name="actions" type="Action">
 					<fieldref>totalActions</fieldref>
 				</list>
 			</bitcase>
 			<bitcase>
 				<enumref ref="MapPart">KeyBehaviors</enumref>
 				<list name="behaviors" type="SetBehavior">
 					<fieldref>totalKeyBehaviors</fieldref>
 				</list>
 			</bitcase>
 			<bitcase>
 				<enumref ref="MapPart">VirtualMods</enumref>
-				<list name="vmods" type="CARD8">
+				<list name="vmods" type="CARD8" mask="ModMask">
 					<popcount><fieldref>virtualMods</fieldref></popcount>
 				</list>
+				<pad align="4" />
 			</bitcase>
 			<bitcase>
 				<enumref ref="MapPart">ExplicitComponents</enumref>
 				<list name="explicit" type="SetExplicit">
 					<fieldref>totalKeyExplicit</fieldref>
 				</list>
+				<pad align="4" />
 			</bitcase>
 			<bitcase>
 				<enumref ref="MapPart">ModifierMap</enumref>
 				<list name="modmap" type="KeyModMap">
 					<fieldref>totalModMapKeys</fieldref>
 				</list>
+				<pad align="4" />
 			</bitcase>
 			<bitcase>
 				<enumref ref="MapPart">VirtualModMap</enumref>
 				<list name="vmodmap" type="KeyVModMap">
 					<fieldref>totalVModMapKeys</fieldref>
 				</list>
 			</bitcase>
@@ -1525,39 +1580,39 @@ <request name="SetCompatMap" opcode="11">
 	</request>
 
 	<request name="GetIndicatorState" opcode="12">
 		<field name="deviceSpec" type="DeviceSpec" />
 		<pad bytes="2" />
 		<reply>
 			<field name="deviceID" type="CARD8" />
-			<field name="state" type="CARD32" />
+			<field name="state" type="SetOfIndicator" />
 			<pad bytes="20" />
 		</reply>
 	</request>
 
 	<request name="GetIndicatorMap" opcode="13">
 		<field name="deviceSpec" type="DeviceSpec" />
 		<pad bytes="2" />
-		<field name="which" type="CARD32" />
+		<field name="which" type="SetOfIndicator" />
 		<reply>
 			<field name="deviceID" type="CARD8" />
-			<field name="which" type="CARD32" />
-			<field name="realIndicators" type="CARD32" />
+			<field name="which" type="SetOfIndicator" />
+			<field name="realIndicators" type="SetOfIndicator" />
 			<field name="nIndicators" type="CARD8" />
 			<pad bytes="15" />
 			<list name="maps" type="IndicatorMap">
 				<popcount><fieldref>which</fieldref></popcount>
 			</list>
 		</reply>
 	</request>
 
 	<request name="SetIndicatorMap" opcode="14">
 		<field name="deviceSpec" type="DeviceSpec" />
 		<pad bytes="2" />
-		<field name="which" type="CARD32" />
+		<field name="which" type="SetOfIndicator" />
 		<list name="maps" type="IndicatorMap">
 			<popcount>
 				<fieldref>which</fieldref>
 			</popcount>
 		</list>
 	</request>
 
@@ -1569,15 +1624,15 @@ <request name="GetNamedIndicator" opcode="15">
 		<field name="indicator" type="ATOM" />
 		<reply>
 			<field name="deviceID" type="CARD8" />
 			<field name="indicator" type="ATOM" />
 			<field name="found" type="BOOL" />
 			<field name="on" type="BOOL" />
 			<field name="realIndicator" type="BOOL" />
-			<field name="ndx" type="CARD8" />
+			<field name="ndx" type="Indicator" />
 			<field name="map_flags" type="CARD8" mask="IMFlag" />
 			<field name="map_whichGroups" type="CARD8" mask="IMGroupsWhich" />
 			<field name="map_groups" type="CARD8" mask="SetOfGroups" />
 			<field name="map_whichMods" type="CARD8" mask="IMModsWhich" />
 			<field name="map_mods" type="CARD8" mask="ModMask" />
 			<field name="map_realMods" type="CARD8" mask="ModMask" />
 			<field name="map_vmod" type="CARD16" mask="VMod" />
@@ -1617,15 +1672,15 @@ <request name="GetNames" opcode="17">
 			<field name="minKeyCode" type="KEYCODE" />
 			<field name="maxKeyCode" type="KEYCODE" />
 			<field name="nTypes" type="CARD8" />
 			<field name="groupNames" type="CARD8" mask="SetOfGroup" />
 			<field name="virtualMods" type="CARD16" mask="VMod" />
 			<field name="firstKey" type="KEYCODE" />
 			<field name="nKeys" type="CARD8" />
-			<field name="indicators" type="CARD32" />
+			<field name="indicators" type="SetOfIndicator" />
 			<field name="nRadioGroups" type="CARD8" />
 			<field name="nKeyAliases" type="CARD8" />
 			<field name="nKTLevels" type="CARD16" />
 			<pad bytes="4" />
 			<switch name="valueList">
 				<fieldref>which</fieldref>
 				<bitcase>
@@ -1657,34 +1712,21 @@ <request name="GetNames" opcode="17">
 					<list name="typeNames" type="ATOM">
 						<fieldref>nTypes</fieldref>
 					</list>
 				</bitcase>
 				<bitcase>
 					<enumref ref="NameDetail">KTLevelNames</enumref>
 					<list name="nLevelsPerType" type="CARD8">
-					  <!-- Xlib uses NTypes here - 
+					  <!-- Xlib uses NTypes here -
 					       the spec says nKTLevels is correct, but
 					       it does not work in reality
 					       <fieldref>nKTLevels</fieldref> -->
 					        <fieldref>nTypes</fieldref>
 					</list>
-					<list type="CARD8" name="alignment_pad">
-					    <op op="-">
-						<op op="&">
-						    <op op="+">
-							<fieldref>nTypes</fieldref>
-							<value>3</value>
-						    </op>
-						    <unop op="~">
-							<value>3</value>
-						    </unop>
-						</op>
-						<fieldref>nTypes</fieldref>
-					    </op>
-					</list>
+					<pad align="4"/>
 					<list name="ktLevelNames" type="ATOM">
 						<sumof ref="nLevelsPerType" />
 					</list>
 				</bitcase>
 				<bitcase>
 					<enumref ref="NameDetail">IndicatorNames</enumref>
 					<list name="indicatorNames" type="ATOM">
@@ -1735,15 +1777,15 @@ <request name="SetNames" opcode="18">
 		<field name="deviceSpec" type="DeviceSpec" />
 		<field name="virtualMods" type="CARD16" mask="VMod" />
 		<field name="which" type="CARD32" mask="NameDetail" />
 		<field name="firstType" type="CARD8" />
 		<field name="nTypes" type="CARD8" />
 		<field name="firstKTLevelt" type="CARD8" />
 		<field name="nKTLevels" type="CARD8" />
-		<field name="indicators" type="CARD32" />
+		<field name="indicators" type="SetOfIndicator" />
 		<field name="groupNames" type="CARD8" mask="SetOfGroup" />
 		<field name="nRadioGroups" type="CARD8" />
 		<field name="firstKey" type="KEYCODE" />
 		<field name="nKeys" type="CARD8" />
 		<field name="nKeyAliases" type="CARD8"/>
 		<pad bytes="1" />
 		<field name="totalKTLevelNames" type="CARD16" />
@@ -1778,16 +1820,21 @@ <request name="SetNames" opcode="18">
 				<list name="typeNames" type="ATOM">
 					<fieldref>nTypes</fieldref>
 				</list>
 			</bitcase>
 			<bitcase>
 				<enumref ref="NameDetail">KTLevelNames</enumref>
 				<list name="nLevelsPerType" type="CARD8">
-					<fieldref>nTypes</fieldref>
+					  <!-- Xlib uses NTypes here -
+					       the spec says nKTLevels is correct, but
+					       it does not work in reality
+					       <fieldref>nKTLevels</fieldref> -->
+					  <fieldref>nTypes</fieldref>
 				</list>
+				<pad align="4"/>
 				<list name="ktLevelNames" type="ATOM">
 					<sumof ref="nLevelsPerType" />
 				</list>
 			</bitcase>
 			<bitcase>
 				<enumref ref="NameDetail">IndicatorNames</enumref>
 				<list name="indicatorNames" type="ATOM">
@@ -1829,15 +1876,14 @@ <request name="SetNames" opcode="18">
 				<list name="radioGroupNames" type="ATOM">
 					<fieldref>nRadioGroups</fieldref>
 				</list>
 			</bitcase>
 		</switch>
 	</request>
 
-	<!-- XXX: Property and doodads are broken, which renders GetGeometry useless
 	<request name="GetGeometry" opcode="19">
 		<field name="deviceSpec" type="DeviceSpec" />
 		<pad bytes="2" />
 		<field name="name" type="ATOM" />
 		<reply>
 			<field name="deviceID" type="CARD8" />
 			<field name="name" type="ATOM" />
@@ -1870,17 +1916,15 @@ <request name="GetGeometry" opcode="19">
 				<fieldref>nDoodads</fieldref>
 			</list>
 			<list name="keyAliases" type="KeyAlias">
 				<fieldref>nKeyAliases</fieldref>
 			</list>
 		</reply>
 	</request>
-	-->
 
-	<!-- XXX: Property and doodads are broken, which renders SetGeometry useless
 	<request name="SetGeometry" opcode="20">
 		<field name="deviceSpec" type="DeviceSpec" />
 		<field name="nShapes" type="CARD8" />
 		<field name="nSections" type="CARD8" />
 		<field name="name" type="ATOM" />
 		<field name="widthMM" type="CARD16" />
 		<field name="heightMM" type="CARD16" />
@@ -1907,15 +1951,14 @@ <request name="SetGeometry" opcode="20">
 		<list name="doodads" type="Doodad">
 			<fieldref>nDoodads</fieldref>
 		</list>
 		<list name="keyAliases" type="KeyAlias">
 			<fieldref>nKeyAliases</fieldref>
 		</list>
 	</request>
-	-->
 
 	<request name="PerClientFlags" opcode="21">
 		<field name="deviceSpec" type="DeviceSpec" />
 		<pad bytes="2" />
 		<field name="change" type="CARD32" mask="PerClientFlag" />
 		<field name="value" type="CARD32" mask="PerClientFlag" />
 		<field name="ctrlsToChange" type="CARD32" mask="BoolCtrl" />
@@ -1930,15 +1973,14 @@ <request name="PerClientFlags" opcode="21">
 			<pad bytes="8" />
 		</reply>
 	</request>
 
 	<request name="ListComponents" opcode="22">
 		<field name="deviceSpec" type="DeviceSpec" />
 		<field name="maxNames" type="CARD16" />
-		<!-- XXX: Intermixed fixed size fields and lists are broken
 		<field name="keymapsSpecLen" type="CARD8" />
 		<list name="keymapsSpec" type="STRING8">
 			<fieldref>keymapsSpecLen</fieldref>
 		</list>
 		<field name="keycodesSpecLen" type="CARD8" />
 		<list name="keycodesSpec" type="STRING8">
 			<fieldref>keycodesSpecLen</fieldref>
@@ -1955,15 +1997,15 @@ <request name="ListComponents" opcode="22">
 		<list name="symbolsSpec" type="STRING8">
 			<fieldref>symbolsSpecLen</fieldref>
 		</list>
 		<field name="geometrySpecLen" type="CARD8" />
 		<list name="geometrySpec" type="STRING8">
 			<fieldref>geometrySpecLen</fieldref>
 		</list>
-		-->
+		<pad align="4" />
 		<reply>
 			<field name="deviceID" type="CARD8" />
 			<field name="nKeymaps" type="CARD16" />
 			<field name="nKeycodes" type="CARD16" />
 			<field name="nTypes" type="CARD16" />
 			<field name="nCompatMaps" type="CARD16" />
 			<field name="nSymbols" type="CARD16" />
@@ -1984,24 +2026,24 @@ <request name="ListComponents" opcode="22">
 			</list>
 			<list name="symbols" type="Listing">
 				<fieldref>nSymbols</fieldref>
 			</list>
 			<list name="geometries" type="Listing">
 				<fieldref>nGeometries</fieldref>
 			</list>
+			<pad align="4" />
 		</reply>
 	</request>
 
 	<request name="GetKbdByName" opcode="23">
 		<field name="deviceSpec" type="DeviceSpec" />
 		<field name="need" type="CARD16" mask="GBNDetail" />
 		<field name="want" type="CARD16" mask="GBNDetail" />
 		<field name="load" type="BOOL" />
 		<pad bytes="1" />
-		<!-- XXX: Intermixed fixed size fields and lists are broken
 		<field name="keymapsSpecLen" type="CARD8" />
 		<list name="keymapsSpec" type="STRING8">
 			<fieldref>keymapsSpecLen</fieldref>
 		</list>
 		<field name="keycodesSpecLen" type="CARD8" />
 		<list name="keycodesSpec" type="STRING8">
 			<fieldref>keycodesSpecLen</fieldref>
@@ -2018,15 +2060,15 @@ <request name="GetKbdByName" opcode="23">
 		<list name="symbolsSpec" type="STRING8">
 			<fieldref>symbolsSpecLen</fieldref>
 		</list>
 		<field name="geometrySpecLen" type="CARD8" />
 		<list name="geometrySpec" type="STRING8">
 			<fieldref>geometrySpecLen</fieldref>
 		</list>
-		-->
+		<pad align="4" />
 		<reply>
 			<field name="deviceID" type="CARD8" />
 			<field name="minKeyCode" type="KEYCODE" />
 			<field name="maxKeyCode" type="KEYCODE" />
 			<field name="loaded" type="BOOL" />
 			<field name="newKeyboard" type="BOOL" />
 			<field name="found" type="CARD16" mask="GBNDetail" />
@@ -2088,14 +2130,15 @@ <request name="GetKbdByName" opcode="23">
 							</list>
 						</bitcase>
 						<bitcase>
 							<enumref ref="MapPart">KeyActions</enumref>
 							<list name="acts_rtrn_count" type="CARD8">
 								<fieldref>nKeyActions</fieldref>
 							</list>
+							<pad align="4" />
 							<list name="acts_rtrn_acts" type="Action">
 								<fieldref>totalActions</fieldref>
 							</list>
 						</bitcase>
 						<bitcase>
 							<enumref ref="MapPart">KeyBehaviors</enumref>
 							<list name="behaviors_rtrn" type="SetBehavior">
@@ -2103,26 +2146,29 @@ <request name="GetKbdByName" opcode="23">
 							</list>
 						</bitcase>
 						<bitcase>
 							<enumref ref="MapPart">VirtualMods</enumref>
 							<list name="vmods_rtrn" type="CARD8" mask="ModMask">
 								<popcount><fieldref>virtualMods</fieldref></popcount>
 							</list>
+							<pad align="4" />
 						</bitcase>
 						<bitcase>
 							<enumref ref="MapPart">ExplicitComponents</enumref>
 							<list name="explicit_rtrn" type="SetExplicit">
 								<fieldref>totalKeyExplicit</fieldref>
 							</list>
+							<pad align="4" />
 						</bitcase>
 						<bitcase>
 							<enumref ref="MapPart">ModifierMap</enumref>
 							<list name="modmap_rtrn" type="KeyModMap">
 								<fieldref>totalModMapKeys</fieldref>
 							</list>
+							<pad align="4" />
 						</bitcase>
 						<bitcase>
 							<enumref ref="MapPart">VirtualModMap</enumref>
 							<list name="vmodmap_rtrn" type="KeyVModMap">
 								<fieldref>totalVModMapKeys</fieldref>
 							</list>
 						</bitcase>
@@ -2155,20 +2201,20 @@ <request name="GetKbdByName" opcode="23">
 					<enumref ref="GBNDetail">IndicatorMaps</enumref>
 					<!-- from the spec, this has to include a reply header -->
 					<field name="indicatormap_type" type="CARD8" />
 					<field name="indicatorDeviceID" type="CARD8" />
 					<field name="indicatormap_sequence" type="CARD16" />
 					<field name="indicatormap_length" type="CARD32" />
 					<!-- done 'emulating' reply header -->
-					<field name="which" type="CARD32" />
-					<field name="realIndicators" type="CARD32" />
+					<field name="which" type="SetOfIndicator" />
+					<field name="realIndicators" type="SetOfIndicator" />
 					<field name="nIndicators" type="CARD8" />
 					<pad bytes="15" />
 					<list name="maps" type="IndicatorMap">
-						<fieldref>nIndicators</fieldref>
+						<popcount><fieldref>which</fieldref></popcount>
 					</list>
 				</bitcase>
 				<bitcase name="key_names">
 					<enumref ref="GBNDetail">KeyNames</enumref>
 					<enumref ref="GBNDetail">OtherNames</enumref>
 					<!-- from the spec, this has to include a reply header -->
 					<field name="keyname_type" type="CARD8" />
@@ -2180,15 +2226,15 @@ <request name="GetKbdByName" opcode="23">
 					<field name="keyMinKeyCode" type="KEYCODE" />
 					<field name="keyMaxKeyCode" type="KEYCODE" />
 					<field name="nTypes" type="CARD8" />
 					<field name="groupNames" type="CARD8" mask="SetOfGroup" />
 					<field name="virtualMods" type="CARD16" mask="VMod" />
 					<field name="firstKey" type="KEYCODE" />
 					<field name="nKeys" type="CARD8" />
-					<field name="indicators" type="CARD32" />
+					<field name="indicators" type="SetOfIndicator" />
 					<field name="nRadioGroups" type="CARD8" />
 					<field name="nKeyAliases" type="CARD8" />
 					<field name="nKTLevels" type="CARD16" />
 					<pad bytes="4" />
 					<switch name="valueList">
 						<fieldref>which</fieldref>
 						<bitcase>
@@ -2220,16 +2266,22 @@ <request name="GetKbdByName" opcode="23">
 							<list name="typeNames" type="ATOM">
 								<fieldref>nTypes</fieldref>
 							</list>
 						</bitcase>
 						<bitcase>
 							<enumref ref="NameDetail">KTLevelNames</enumref>
 							<list name="nLevelsPerType" type="CARD8">
+							  <!-- Xlib uses NTypes here -
+							       the spec says nKTLevels is correct, but
+							       it does not work in reality
+							       the appendix D. of the spec also says NTypes
+							       <fieldref>nKTLevels</fieldref> -->
 								<fieldref>nTypes</fieldref>
 							</list>
+							<pad align="4"/>
 							<list name="ktLevelNames" type="ATOM">
 								<sumof ref="nLevelsPerType" />
 							</list>
 						</bitcase>
 						<bitcase>
 							<enumref ref="NameDetail">IndicatorNames</enumref>
 							<list name="indicatorNames" type="ATOM">
@@ -2292,36 +2344,32 @@ <request name="GetKbdByName" opcode="23">
 					<field name="nShapes" type="CARD16" />
 					<field name="nSections" type="CARD16" />
 					<field name="nDoodads" type="CARD16" />
 					<field name="nKeyAliases" type="CARD16" />
 					<field name="baseColorNdx" type="CARD8" />
 					<field name="labelColorNdx" type="CARD8" />
 					<field name="labelFont" type="CountedString16" />
-					<!-- XXX: Property is broken
 					<list name="properties" type="Property">
 						<fieldref>nProperties</fieldref>
 					</list>
 					<list name="colors" type="CountedString16">
 						<fieldref>nColors</fieldref>
 					</list>
 					<list name="shapes" type="Shape">
 						<fieldref>nShapes</fieldref>
 					</list>
-					-->
-					<!-- XXX: doodads are broken
 					<list name="sections" type="Section">
 						<fieldref>nSections</fieldref>
 					</list>
 					<list name="doodads" type="Doodad">
 						<fieldref>nDoodads</fieldref>
 					</list>
 					<list name="keyAliases" type="KeyAlias">
 						<fieldref>nKeyAliases</fieldref>
 					</list>
-					-->
 				</bitcase>
 			</switch>
 		</reply>
 	</request>
 
 	<request name="GetDeviceInfo" opcode="24">
 		<field name="deviceSpec" type="DeviceSpec" />
@@ -2348,14 +2396,15 @@ <request name="GetDeviceInfo" opcode="24">
 			<field name="dfltLedFB" type="CARD16" altenum="ID" />
 			<pad bytes="2" />
 			<field name="devType" type="ATOM" />
 			<field name="nameLen" type="CARD16" />
 			<list name="name" type="STRING8">
 				<fieldref>nameLen</fieldref>
 			</list>
+			<pad align="4" />
 			<list name="btnActions" type="Action">
 				<fieldref>nBtnsRtrn</fieldref>
 			</list>
 			<list name="leds" type="DeviceLedInfo">
 				<fieldref>nDeviceLedFBs</fieldref>
 			</list>
 		</reply>
@@ -2382,14 +2431,15 @@ <request name="SetDebuggingFlags" opcode="101">
 		<field name="affectFlags" type="CARD32" />
 		<field name="flags" type="CARD32" />
 		<field name="affectCtrls" type="CARD32" />
 		<field name="ctrls" type="CARD32" />
 		<list name="message" type="STRING8">
 			<fieldref>msgLength</fieldref>
 		</list>
+		<pad align="4" />
 		<reply>
 			<pad bytes="1" />
 			<field name="currentFlags" type="CARD32" />
 			<field name="currentCtrls" type="CARD32" />
 			<field name="supportedFlags" type="CARD32" />
 			<field name="supportedCtrls" type="CARD32" />
 			<pad bytes="8" />
@@ -2481,26 +2531,26 @@ <event name="ControlsNotify" number="3">
 	</event>
 
 	<event name="IndicatorStateNotify" number="4">
 		<field name="xkbType" type="CARD8" />
 		<field name="time" type="TIMESTAMP" />
 		<field name="deviceID" type="CARD8" />
 		<pad bytes="3" />
-		<field name="state" type="CARD32" />
-		<field name="stateChanged" type="CARD32" />
+		<field name="state" type="SetOfIndicator" />
+		<field name="stateChanged" type="SetOfIndicator" />
 		<pad bytes="12" />
 	</event>
 
 	<event name="IndicatorMapNotify" number="5">
 		<field name="xkbType" type="CARD8" />
 		<field name="time" type="TIMESTAMP" />
 		<field name="deviceID" type="CARD8" />
 		<pad bytes="3" />
-		<field name="state" type="CARD32" />
-		<field name="mapChanged" type="CARD32" />
+		<field name="state" type="SetOfIndicator" />
+		<field name="mapChanged" type="SetOfIndicator" />
 		<pad bytes="12" />
 	</event>
 
 	<event name="NamesNotify" number="6">
 		<field name="xkbType" type="CARD8" />
 		<field name="time" type="TIMESTAMP" />
 		<field name="deviceID" type="CARD8" />
@@ -2513,15 +2563,15 @@ <event name="NamesNotify" number="6">
 		<pad bytes="1" />
 		<field name="nRadioGroups" type="CARD8" />
 		<field name="nKeyAliases" type="CARD8" />
 		<field name="changedGroupNames" type="CARD8" mask="SetOfGroup" />
 		<field name="changedVirtualMods" type="CARD16" mask="VMod" />
 		<field name="firstKey" type="KEYCODE" />
 		<field name="nKeys" type="CARD8" />
-		<field name="changedIndicators" type="CARD32" />
+		<field name="changedIndicators" type="SetOfIndicator" />
 		<pad bytes="4" />
 	</event>
 
 	<event name="CompatMapNotify" number="7">
 		<field name="xkbType" type="CARD8" />
 		<field name="time" type="TIMESTAMP" />
 		<field name="deviceID" type="CARD8" />
@@ -2574,19 +2624,19 @@ <event name="AccessXNotify" number="10">
 	</event>
 
 	<event name="ExtensionDeviceNotify" number="11">
 		<field name="xkbType" type="CARD8" />
 		<field name="time" type="TIMESTAMP" />
 		<field name="deviceID" type="CARD8" />
 		<pad bytes="1" />
-		<field name="reason" type="CARD16" mask="XIFeature" />
+		<field name="reason" type="CARD16" mask="XIDetail" />
 		<field name="ledClass" type="CARD16" enum="LedClassResult" />
 		<field name="ledID" type="CARD16" />
-		<field name="ledsDefined" type="CARD32" />
-		<field name="ledState" type="CARD32" />
+		<field name="ledsDefined" type="SetOfIndicator" />
+		<field name="ledState" type="SetOfIndicator" />
 		<field name="firstButton" type="CARD8" />
 		<field name="nButtons" type="CARD8" />
 		<field name="supported" type="CARD16" mask="XIFeature" />
 		<field name="unsupported" type="CARD16" mask="XIFeature" />
 		<pad bytes="2" />
 	</event>
 </xcb>
-- 
2.0.1



More information about the Xcb mailing list