[Xcb-commit] xcb/proto: 7 commits - HACKING src
Arnaud Fontaine
arnau at kemper.freedesktop.org
Thu Nov 14 03:29:09 PST 2013
HACKING | 20 ++++++++++++++++++++
src/.gitattributes | 1 +
src/xinput.xml | 34 +++++++++++++++++++++++++++++++++-
src/xkb.xml | 24 ++++++++++++++++++++++++
src/xv.xml | 8 --------
5 files changed, 78 insertions(+), 9 deletions(-)
New commits:
commit 7c85d67b1b2edc421d889f9c5c3873e163363e7a
Author: Ran Benita <ran234 at gmail.com>
Date: Sun Oct 13 13:44:41 2013 +0200
xkb: Add struct Property as per spec (commented out)
The specification says that Property is a struct of two CountedString16
(name and value). This form can't be handled atm. correctly too. But,
add it as a comment so we've it at hand when we know what to do with it.
All credits go to Ran Benita, as he found this.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
diff --git a/src/xkb.xml b/src/xkb.xml
index 8c9b067..1df0771 100644
--- a/src/xkb.xml
+++ b/src/xkb.xml
@@ -559,6 +559,14 @@ authorization from the authors.
</list>
</struct>
-->
+ <!-- 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" />
commit e76dc36de885339d680e8faf8afce19250d7dcb6
Author: Daniel Martin <consume.noise at gmail.com>
Date: Sun Oct 13 13:44:40 2013 +0200
xkb: Comment out intermixed fixed size fields and lists
c_client.py doesn't handle such intermixed fixed size fields and lists
correctly. Therefor comment them out.
With that change the size of the generated request structure for
ListComponents has 8 Bytes which is the same as xkbListComponentsReq
has and the server checks REQUEST_AT_LEAST_SIZE(xkbListComponentsReq).
The same goes for GetKbdByName, which results in a structure of 12
Bytes.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
Reviewed-By: Ran Benita <ran234 at gmail.com>
diff --git a/src/xkb.xml b/src/xkb.xml
index a095958..8c9b067 100644
--- a/src/xkb.xml
+++ b/src/xkb.xml
@@ -1974,6 +1974,7 @@ authorization from the authors.
<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>
@@ -1998,6 +1999,7 @@ authorization from the authors.
<list name="geometrySpec" type="STRING8">
<fieldref>geometrySpecLen</fieldref>
</list>
+ -->
<reply>
<field name="deviceID" type="CARD8" />
<field name="nKeymaps" type="CARD16" />
@@ -2035,6 +2037,7 @@ authorization from the authors.
<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>
@@ -2059,6 +2062,7 @@ authorization from the authors.
<list name="geometrySpec" type="STRING8">
<fieldref>geometrySpecLen</fieldref>
</list>
+ -->
<reply>
<field name="deviceID" type="CARD8" />
<field name="minKeyCode" type="KEYCODE" />
commit 0c408c53ffdde107ed8c01144cce3da427f1a45f
Author: Daniel Martin <consume.noise at gmail.com>
Date: Sun Oct 13 13:44:39 2013 +0200
xkb: Comment out the struct Property and {Get, Set}Geometry
This struct has intermixed fixed size fields and lists, which
c_client.py doesn't handle properly. Therefor comment out the struct and
the fields type-referencing it.
As doodads are commented out already and with Property gone the requests
GetGeomtry and SetGeometry become pretty much useless. Therefor comment
them out completly.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
Reviewed-By: Ran Benita <ran234 at gmail.com>
diff --git a/src/xkb.xml b/src/xkb.xml
index 5436401..a095958 100644
--- a/src/xkb.xml
+++ b/src/xkb.xml
@@ -547,6 +547,7 @@ authorization from the authors.
<typedef oldname="char" newname="STRING8" />
+ <!-- XXX: Property is broken
<struct name="Property">
<field name="nameLength" type="CARD16" />
<list name="name" type="STRING8">
@@ -557,6 +558,7 @@ authorization from the authors.
<fieldref>valueLength</fieldref>
</list>
</struct>
+ -->
<struct name="Outline">
<field name="nPoints" type="CARD8" />
@@ -1871,6 +1873,7 @@ authorization from the authors.
</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" />
@@ -1900,7 +1903,6 @@ authorization from the authors.
<list name="shapes" type="Shape">
<fieldref>nShapes</fieldref>
</list>
- <!-- XXX: doodads are broken
<list name="sections" type="Section">
<fieldref>nSections</fieldref>
</list>
@@ -1910,10 +1912,11 @@ authorization from the authors.
<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" />
@@ -1938,7 +1941,6 @@ authorization from the authors.
<list name="shapes" type="Shape">
<fieldref>nShapes</fieldref>
</list>
- <!-- XXX: doodads are broken
<list name="sections" type="Section">
<fieldref>nSections</fieldref>
</list>
@@ -1948,8 +1950,8 @@ authorization from the authors.
<list name="keyAliases" type="KeyAlias">
<fieldref>nKeyAliases</fieldref>
</list>
- -->
</request>
+ -->
<request name="PerClientFlags" opcode="21">
<field name="deviceSpec" type="DeviceSpec" />
@@ -2330,6 +2332,7 @@ authorization from the authors.
<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>
@@ -2339,6 +2342,7 @@ authorization from the authors.
<list name="shapes" type="Shape">
<fieldref>nShapes</fieldref>
</list>
+ -->
<!-- XXX: doodads are broken
<list name="sections" type="Section">
<fieldref>nSections</fieldref>
commit 7482d02e6229bfa1eae573b114ea3c04eaf6cb52
Author: Daniel Martin <consume.noise at gmail.com>
Date: Sun Oct 13 13:44:38 2013 +0200
xkb: Comment out Doodads
Doodads are known to be broken (*). Comment them out until they can be
handled properly.
(*) One problem is that TextDoodad and LogoDoodad have variadic lists at
the end. But, they're within a union with other fixed size Doodads. A
union doesn't have a hint which field is in use and therefor the code
generator (at least c_client.py) just creates a generic iterator for the
Doodad union, which fails for TextDoodad and LogoDoodad.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
Reviewed-By: Ran Benita <ran234 at gmail.com>
diff --git a/src/xkb.xml b/src/xkb.xml
index 2ea659c..5436401 100644
--- a/src/xkb.xml
+++ b/src/xkb.xml
@@ -633,6 +633,7 @@ authorization from the authors.
<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" />
@@ -726,6 +727,7 @@ authorization from the authors.
<fieldref>nOverlays</fieldref>
</list>
</struct>
+ -->
<struct name="Listing">
<field name="flags" type="CARD16" />
@@ -1898,6 +1900,7 @@ authorization from the authors.
<list name="shapes" type="Shape">
<fieldref>nShapes</fieldref>
</list>
+ <!-- XXX: doodads are broken
<list name="sections" type="Section">
<fieldref>nSections</fieldref>
</list>
@@ -1907,6 +1910,7 @@ authorization from the authors.
<list name="keyAliases" type="KeyAlias">
<fieldref>nKeyAliases</fieldref>
</list>
+ -->
</reply>
</request>
@@ -1934,6 +1938,7 @@ authorization from the authors.
<list name="shapes" type="Shape">
<fieldref>nShapes</fieldref>
</list>
+ <!-- XXX: doodads are broken
<list name="sections" type="Section">
<fieldref>nSections</fieldref>
</list>
@@ -1943,6 +1948,7 @@ authorization from the authors.
<list name="keyAliases" type="KeyAlias">
<fieldref>nKeyAliases</fieldref>
</list>
+ -->
</request>
<request name="PerClientFlags" opcode="21">
@@ -2333,6 +2339,7 @@ authorization from the authors.
<list name="shapes" type="Shape">
<fieldref>nShapes</fieldref>
</list>
+ <!-- XXX: doodads are broken
<list name="sections" type="Section">
<fieldref>nSections</fieldref>
</list>
@@ -2342,6 +2349,7 @@ authorization from the authors.
<list name="keyAliases" type="KeyAlias">
<fieldref>nKeyAliases</fieldref>
</list>
+ -->
</bitcase>
</switch>
</reply>
commit 2c024996d2ecccedcc41607e64d95862a08ba0dc
Author: Daniel Martin <consume.noise at gmail.com>
Date: Sun Oct 13 13:44:37 2013 +0200
Add note on pretty patches and src/.gitattributes
Add a file HACKING describing howto to prettify patches (their hunk
headers) and add src/.gitattributes, which is necessary for that.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
Reviewed-By: Ran Benita <ran234 at gmail.com>
diff --git a/HACKING b/HACKING
new file mode 100644
index 0000000..e954a76
--- /dev/null
+++ b/HACKING
@@ -0,0 +1,20 @@
+Make patches more descriptive
+=============================
+
+By default hunk headers of a patch will look like this:
+
+ @@ -1227,6 +1227,8 @@ authorization from the authors.
+
+Which is not very usefull as it doesn't give a hint where the change
+happened (except for the line number). To make those hunk headers more
+descriptive, i.e.:
+
+ @@ -1227,6 +1227,8 @@ <struct name="HierarchyChange">
+
+Add these 2 lines to your .git/config file:
+
+ [diff "xcb"]
+ xfuncname = "(<\\b(xcb|enum|event|request|struct|union)\\b.*>)"
+
+For more background on this magic have a look at src/.gitattributes and
+the man page gitattributes(5) chapter "Defining a custom hunk-header".
diff --git a/src/.gitattributes b/src/.gitattributes
new file mode 100644
index 0000000..8d345b0
--- /dev/null
+++ b/src/.gitattributes
@@ -0,0 +1 @@
+*.xml diff=xcb
commit 508a220f48ee1f58cb4ab10c63dbeab2e4346e86
Author: Daniel Martin <consume.noise at gmail.com>
Date: Sun Oct 13 13:44:36 2013 +0200
xv: Remove obsolete comments in EncodingInfo and QueryEncodings
The padding in EncodingInfo (struct) and QueryEncodings (reply) has been
fixed upstream:
Xvproto: fix xvEncodingInfo to match actual wire protocol
http://cgit.freedesktop.org/xorg/proto/videoproto/commit/?id=d970512
and
Xvproto.h: fix xvQueryEncodingsReply to match actual wire protocol
http://cgit.freedesktop.org/xorg/proto/videoproto/commit/?id=1a96222
So, we can remove the comments.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
Reviewed-by: Arnaud Fontaine <arnau at debian.org>
diff --git a/src/xv.xml b/src/xv.xml
index a05767c..0b55d36 100644
--- a/src/xv.xml
+++ b/src/xv.xml
@@ -112,10 +112,6 @@ authorization from the authors.
<field type="CARD16" name="name_size" />
<field type="CARD16" name="width" />
<field type="CARD16" name="height" />
- <!--
- Some versions of Xvproto.h incorrectly have
- this padding after "rate".
- -->
<pad bytes="2" />
<field type="Rational" name="rate" />
<list type="char" name="name">
@@ -234,10 +230,6 @@ authorization from the authors.
<reply>
<pad bytes="1" />
<field type="CARD16" name="num_encodings" />
- <!--
- In Xvproto.h this padding is 24 bytes
- in actuality it is 22 bytes
- -->
<pad bytes="22" />
<list type="EncodingInfo" name="info">
<fieldref>num_encodings</fieldref>
commit 6e841e1562a23d4488f8c33f1087773dd7fa93b4
Author: Daniel Martin <consume.noise at gmail.com>
Date: Sun Oct 13 13:44:35 2013 +0200
xinput: Add XI2 event enum. for event selection
This adds an enumeration 'XIEventMask', which is necessary to select for
XI2 events via the SelectEvent request.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
Reviewed-By: Ran Benita <ran234 at gmail.com>
diff --git a/src/xinput.xml b/src/xinput.xml
index e62b7cb..dd3f184 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -1257,10 +1257,42 @@ authorization from the authors.
<!-- XISelectEvents -->
+ <enum name="XIEventMask">
+ <item name="DeviceChanged"> <bit>1</bit> </item>
+ <item name="KeyPress"> <bit>2</bit> </item>
+ <item name="KeyRelease"> <bit>3</bit> </item>
+ <item name="ButtonPress"> <bit>4</bit> </item>
+ <item name="ButtonRelease"> <bit>5</bit> </item>
+ <item name="Motion"> <bit>6</bit> </item>
+ <item name="Enter"> <bit>7</bit> </item>
+ <item name="Leave"> <bit>8</bit> </item>
+ <item name="FocusIn"> <bit>9</bit> </item>
+ <item name="FocusOut"> <bit>10</bit> </item>
+ <item name="Hierarchy"> <bit>11</bit> </item>
+ <item name="Property"> <bit>12</bit> </item>
+ <!-- â
â
â
Events (v2.1) â
â
â
-->
+ <item name="RawKeyPress"> <bit>13</bit> </item>
+ <item name="RawKeyRelease"> <bit>14</bit> </item>
+ <item name="RawButtonPress"> <bit>15</bit> </item>
+ <item name="RawButtonRelease"> <bit>16</bit> </item>
+ <item name="RawMotion"> <bit>17</bit> </item>
+ <!-- â
â
â
Events (v2.2) â
â
â
-->
+ <item name="TouchBegin"> <bit>18</bit> </item>
+ <item name="TouchUpdate"> <bit>19</bit> </item>
+ <item name="TouchEnd"> <bit>20</bit> </item>
+ <item name="TouchOwnership"> <bit>21</bit> </item>
+ <item name="RawTouchBegin"> <bit>22</bit> </item>
+ <item name="RawTouchUpdate"> <bit>23</bit> </item>
+ <item name="RawTouchEnd"> <bit>24</bit> </item>
+ <!-- â
â
â
Events (v2.3) â
â
â
-->
+ <item name="BarrierHit"> <bit>25</bit> </item>
+ <item name="BarrierLeave"> <bit>26</bit> </item>
+ </enum>
+
<struct name="EventMask">
<field type="DeviceId" name="deviceid" altenum="Device" />
<field type="CARD16" name="mask_len" />
- <list type="CARD32" name="mask"> <!-- set of EventMaskBit -->
+ <list type="CARD32" name="mask" mask="XIEventMask">
<fieldref>mask_len</fieldref>
</list>
</struct>
More information about the xcb-commit
mailing list