Skip to content

Commit

Permalink
[X11] Update xcbproto
Browse files Browse the repository at this point in the history
This is needed to fix a DCHECK() in xinput.cc when launching a debug
build of Chrome in an Xwayland session within sway.

R=sky

Fixed: 1285594
Change-Id: I7841ca324ec4a1e8b9faaa735bff66c19f856daa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3552320
Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#985606}
  • Loading branch information
tanderson-google authored and Chromium LUCI CQ committed Mar 26, 2022
1 parent f177513 commit 523a0fc
Show file tree
Hide file tree
Showing 34 changed files with 1,659 additions and 355 deletions.
2 changes: 1 addition & 1 deletion third_party/xcbproto/README.chromium
@@ -1,7 +1,7 @@
Name: xcbproto
Short Name: xcbproto
URL: https://gitlab.freedesktop.org/xorg/proto/xcbproto
Version: 496e3ce329c3cc9b32af4054c30fa0f306deb007
Version: 70ca65fa35c3760661b090bc4b2601daa7a099b8
CPEPrefix: unknown
Security Critical: no
License: MIT
Expand Down
2 changes: 1 addition & 1 deletion third_party/xcbproto/VERSION
@@ -1 +1 @@
496e3ce329c3cc9b32af4054c30fa0f306deb007
70ca65fa35c3760661b090bc4b2601daa7a099b8
36 changes: 15 additions & 21 deletions third_party/xcbproto/patch.diff
@@ -1,6 +1,6 @@
diff -ru xcbproto/src/glx.xml src/src/glx.xml
--- xcbproto/src/glx.xml 2021-02-10 12:51:13.785903766 -0800
+++ src/src/glx.xml 2021-02-04 15:13:24.836890047 -0800
--- xcbproto/src/glx.xml 2022-03-25 16:30:06.066425385 -0700
+++ src/src/glx.xml 2022-03-25 16:29:28.146096207 -0700
@@ -62,8 +62,6 @@
<type>glx:WINDOW</type>
</xidunion>
Expand Down Expand Up @@ -292,8 +292,8 @@ diff -ru xcbproto/src/glx.xml src/src/glx.xml
</list>
</reply>
diff -ru xcbproto/src/present.xml src/src/present.xml
--- xcbproto/src/present.xml 2021-02-10 12:51:13.785903766 -0800
+++ src/src/present.xml 2021-02-10 12:51:07.933863954 -0800
--- xcbproto/src/present.xml 2022-03-25 16:30:06.050425246 -0700
+++ src/src/present.xml 2022-03-25 16:27:47.661223477 -0700
@@ -89,7 +89,7 @@
</reply>
</request>
Expand All @@ -304,8 +304,8 @@ diff -ru xcbproto/src/present.xml src/src/present.xml
<field type="WINDOW" name="window" />
<field type="PIXMAP" name="pixmap" />
diff -ru xcbproto/src/randr.xml src/src/randr.xml
--- xcbproto/src/randr.xml 2021-02-10 12:51:13.785903766 -0800
+++ src/src/randr.xml 2021-02-04 11:51:16.530051106 -0800
--- xcbproto/src/randr.xml 2022-03-25 16:30:06.050425246 -0700
+++ src/src/randr.xml 2022-03-25 16:27:47.661223477 -0700
@@ -803,64 +803,6 @@
<item name="Lease"> <value>6</value></item>
</enum>
Expand Down Expand Up @@ -479,8 +479,8 @@ diff -ru xcbproto/src/randr.xml src/src/randr.xml
</event>
</xcb>
diff -ru xcbproto/src/shm.xml src/src/shm.xml
--- xcbproto/src/shm.xml 2021-02-10 12:51:13.789903793 -0800
+++ src/src/shm.xml 2021-02-04 11:51:16.530051106 -0800
--- xcbproto/src/shm.xml 2022-03-25 16:30:06.050425246 -0700
+++ src/src/shm.xml 2022-03-25 16:27:47.661223477 -0700
@@ -78,7 +78,7 @@
<field type="INT16" name="dst_x" />
<field type="INT16" name="dst_y" />
Expand All @@ -491,8 +491,8 @@ diff -ru xcbproto/src/shm.xml src/src/shm.xml
<pad bytes="1" />
<field type="SEG" name="shmseg" />
diff -ru xcbproto/src/xinput.xml src/src/xinput.xml
--- xcbproto/src/xinput.xml 2021-02-10 12:51:13.789903793 -0800
+++ src/src/xinput.xml 2021-02-08 17:31:46.995137506 -0800
--- xcbproto/src/xinput.xml 2022-03-25 16:30:06.066425385 -0700
+++ src/src/xinput.xml 2022-03-25 16:29:28.146096207 -0700
@@ -200,7 +200,12 @@
<list type="STR" name="names">
<fieldref>devices_len</fieldref>
Expand Down Expand Up @@ -693,8 +693,8 @@ diff -ru xcbproto/src/xinput.xml src/src/xinput.xml
<!-- ⋅⋅⋅ Events (v2.3) ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->

diff -ru xcbproto/src/xproto.xml src/src/xproto.xml
--- xcbproto/src/xproto.xml 2021-02-10 12:51:13.789903793 -0800
+++ src/src/xproto.xml 2021-02-04 15:13:24.840890072 -0800
--- xcbproto/src/xproto.xml 2022-03-25 16:30:06.070425420 -0700
+++ src/src/xproto.xml 2022-03-25 16:29:28.150096242 -0700
@@ -963,6 +963,7 @@
<item name="CAP_HEIGHT"> <value>66</value> </item>
<item name="WM_CLASS"> <value>67</value> </item>
Expand Down Expand Up @@ -737,15 +737,10 @@ diff -ru xcbproto/src/xproto.xml src/src/xproto.xml
</request>

<!-- Reply from SetPointerMapping or SetModifierMapping -->
Only in src/xcbgen: align.pyc
Only in src/xcbgen: error.pyc
Only in src/xcbgen: expr.pyc
Only in src/xcbgen: __init__.pyc
Only in src/xcbgen: matcher.pyc
Only in src/xcbgen: state.pyc
Only in src/xcbgen: __pycache__
diff -ru xcbproto/xcbgen/xtypes.py src/xcbgen/xtypes.py
--- xcbproto/xcbgen/xtypes.py 2021-02-10 12:51:13.789903793 -0800
+++ src/xcbgen/xtypes.py 2021-02-04 15:13:24.840890072 -0800
--- xcbproto/xcbgen/xtypes.py 2022-03-25 16:30:06.070425420 -0700
+++ src/xcbgen/xtypes.py 2022-03-25 16:29:28.150096242 -0700
@@ -226,7 +226,7 @@
Derived class which represents a file descriptor.
'''
Expand All @@ -755,4 +750,3 @@ diff -ru xcbproto/xcbgen/xtypes.py src/xcbgen/xtypes.py
self.is_fd = True

def fixed_size(self):
Only in src/xcbgen: xtypes.pyc
21 changes: 19 additions & 2 deletions third_party/xcbproto/src/doc/xml-xcb.txt
Expand Up @@ -65,8 +65,8 @@ Top-Level Elements

This element represents a data structure. The name attribute gives the name
of the structure. The content represents the fields of the structure, and
consists of one or more of the field, pad, and list elements described in
the section "Structure Contents" below.
consists of one or more of the length, field, pad, and list elements described
in the section "Structure Contents" below.

<union name="identifier">structure contents</union>

Expand Down Expand Up @@ -215,6 +215,23 @@ enum; the value is restricted to one of the constants named in the enum.
declares the data type of the field, and the name attribute gives the name
of the field.

<length>expression</length>
This element overrides the length of the data structure by specifying it
explicitly instead of it being defined by the layout of the structure.
This makes it possible to handle structures with conditional fields
(see the <switch> element) where the future revisions of protocols may
introduce new variants and old code must still properly ignore them.

The content is an expression giving the length of the data structure in terms
of other fields in the structure. See the section "Expressions" for details
on the expression representation.

The expression must not depend on conditional fields.

Additionally, the length of the data structure must be at least such that it
includes the fields that the expression depends on. Smaller length is
considered a violation of the protocol.

<fd name="identifier" />

This element represents a file descriptor field passed with the request. The
Expand Down
2 changes: 2 additions & 0 deletions third_party/xcbproto/src/src/glx.xml
Expand Up @@ -489,6 +489,7 @@ The patch that fixed this server bug in X.org CVS is here:
<list type="char" name="gl_extension_string">
<fieldref>gl_str_len</fieldref>
</list>
<pad align="4" />
<list type="char" name="glx_extension_string">
<fieldref>glx_str_len</fieldref>
</list>
Expand Down Expand Up @@ -525,6 +526,7 @@ The patch that fixed this server bug in X.org CVS is here:
<list type="char" name="gl_extension_string">
<fieldref>gl_str_len</fieldref>
</list>
<pad align="4" />
<list type="char" name="glx_extension_string">
<fieldref>glx_str_len</fieldref>
</list>
Expand Down
8 changes: 8 additions & 0 deletions third_party/xcbproto/src/src/xcb.xsd
Expand Up @@ -101,6 +101,13 @@ authorization from the authors.
<!-- field replaces FIELD, PARAM, and REPLY. -->
<xsd:element name="field" type="var" />

<!-- Length of data structures -->
<xsd:element name="length">
<xsd:complexType>
<xsd:group ref="expression" />
</xsd:complexType>
</xsd:element>

<!-- fd passing parameter -->
<xsd:element name="fd">
<xsd:complexType>
Expand Down Expand Up @@ -210,6 +217,7 @@ authorization from the authors.
<xsd:element ref="list" />
<xsd:element ref="fd" />
<xsd:element ref="required_start_align" />
<xsd:element ref="length" />
</xsd:choice>
</xsd:group>

Expand Down
22 changes: 21 additions & 1 deletion third_party/xcbproto/src/src/xfixes.xml
Expand Up @@ -26,7 +26,7 @@ authorization from the authors.
-->
<!-- This file describes version 4 of XFixes. -->
<xcb header="xfixes" extension-xname="XFIXES" extension-name="XFixes"
major-version="5" minor-version="0">
major-version="6" minor-version="0">
<import>xproto</import>
<import>render</import>
<import>shape</import>
Expand Down Expand Up @@ -359,4 +359,24 @@ authorization from the authors.
<request name="DeletePointerBarrier" opcode="32">
<field type="BARRIER" name="barrier" />
</request>

<!-- Version 6 -->

<enum name="ClientDisconnectFlags">
<item name="Default"><value>0</value></item>
<item name="Terminate"><bit>0</bit></item>
</enum>

<request name="SetClientDisconnectMode" opcode="33">
<field type="CARD32" name="disconnect_mode" mask="ClientDisconnectFlags" />
</request>

<request name="GetClientDisconnectMode" opcode="34">
<reply>
<pad bytes="1" />
<field type="CARD32" name="disconnect_mode" mask="ClientDisconnectFlags" />
<pad bytes="20" />
</reply>
</request>

</xcb>
100 changes: 94 additions & 6 deletions third_party/xcbproto/src/src/xinput.xml
Expand Up @@ -33,7 +33,7 @@ authorization from the authors.
-->

<xcb header="xinput" extension-xname="XInputExtension" extension-name="Input"
major-version="2" minor-version="3">
major-version="2" minor-version="4">
<import>xfixes</import>
<import>xproto</import>

Expand Down Expand Up @@ -1607,6 +1607,7 @@ authorization from the authors.
<item name="Valuator"> <value>2</value> </item>
<item name="Scroll"> <value>3</value> </item>
<item name="Touch"> <value>8</value> </item>
<item name="Gesture"> <value>9</value> </item>
</enum>

<enum name="DeviceType">
Expand Down Expand Up @@ -1680,6 +1681,14 @@ authorization from the authors.
<field type="CARD8" name="num_touches" />
</struct>

<struct name="GestureClass">
<field type="CARD16" name="type" enum="DeviceClassType" />
<field type="CARD16" name="len" />
<field type="DeviceId" name="sourceid" />
<field type="CARD8" name="num_touches" />
<pad bytes="1" />
</struct>

<struct name="ValuatorClass">
<field type="CARD16" name="type" enum="DeviceClassType" />
<field type="CARD16" name="len" />
Expand All @@ -1695,6 +1704,12 @@ authorization from the authors.
</struct>

<struct name="DeviceClass">
<length>
<op op="*">
<fieldref>len</fieldref>
<value>4</value>
</op>
</length>
<field type="CARD16" name="type" enum="DeviceClassType" />
<field type="CARD16" name="len" />
<field type="DeviceId" name="sourceid" />
Expand Down Expand Up @@ -1752,6 +1767,11 @@ authorization from the authors.
<field type="CARD8" name="mode" enum="TouchMode" />
<field type="CARD8" name="num_touches" />
</case>
<case name="gesture">
<enumref ref="DeviceClassType">Gesture</enumref>
<field type="CARD8" name="num_touches" />
<pad bytes="1" />
</case>
</switch>
</struct>

Expand Down Expand Up @@ -1872,11 +1892,13 @@ authorization from the authors.
</enum>

<enum name="GrabType">
<item name="Button"> <value>0</value> </item>
<item name="Keycode"> <value>1</value> </item>
<item name="Enter"> <value>2</value> </item>
<item name="FocusIn"> <value>3</value> </item>
<item name="TouchBegin"> <value>4</value> </item>
<item name="Button"> <value>0</value> </item>
<item name="Keycode"> <value>1</value> </item>
<item name="Enter"> <value>2</value> </item>
<item name="FocusIn"> <value>3</value> </item>
<item name="TouchBegin"> <value>4</value> </item>
<item name="GesturePinchBegin"> <value>5</value> </item>
<item name="GestureSwipeBegin"> <value>6</value> </item>
</enum>

<enum name="ModifierMask">
Expand Down Expand Up @@ -2485,6 +2507,72 @@ authorization from the authors.

<eventcopy name="BarrierLeave" number="26" ref="BarrierHit" />

<!-- ⋅⋅⋅ Events (v2.4) ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->

<enum name="GesturePinchEventFlags">
<item name="GesturePinchCancelled"> <bit>0</bit> </item>
</enum>

<event name="GesturePinchBegin" number="27" xge="true">
<field type="DeviceId" name="deviceid" altenum="Device" />
<field type="TIMESTAMP" name="time" altenum="Time" />
<!-- event specific fields -->
<field type="CARD32" name="detail" />
<field type="WINDOW" name="root" />
<field type="WINDOW" name="event" />
<field type="WINDOW" name="child" />
<!-- 32 byte boundary -->
<field type="FP1616" name="root_x" />
<field type="FP1616" name="root_y" />
<field type="FP1616" name="event_x" />
<field type="FP1616" name="event_y" />
<field type="FP1616" name="delta_x" />
<field type="FP1616" name="delta_y" />
<field type="FP1616" name="delta_unaccel_x" />
<field type="FP1616" name="delta_unaccel_y" />
<field type="FP1616" name="scale" />
<field type="FP1616" name="delta_angle" />
<field type="DeviceId" name="sourceid" altenum="Device" />
<pad bytes="2" />
<field type="ModifierInfo" name="mods" />
<field type="GroupInfo" name="group" />
<field type="CARD32" name="flags" mask="GesturePinchEventFlags" />
</event>

<eventcopy name="GesturePinchUpdate" number="28" ref="GesturePinchBegin" />
<eventcopy name="GesturePinchEnd" number="29" ref="GesturePinchBegin" />

<enum name="GestureSwipeEventFlags">
<item name="GestureSwipeCancelled"> <bit>0</bit> </item>
</enum>

<event name="GestureSwipeBegin" number="30" xge="true">
<field type="DeviceId" name="deviceid" altenum="Device" />
<field type="TIMESTAMP" name="time" altenum="Time" />
<!-- event specific fields -->
<field type="CARD32" name="detail" />
<field type="WINDOW" name="root" />
<field type="WINDOW" name="event" />
<field type="WINDOW" name="child" />
<!-- 32 byte boundary -->
<field type="FP1616" name="root_x" />
<field type="FP1616" name="root_y" />
<field type="FP1616" name="event_x" />
<field type="FP1616" name="event_y" />
<field type="FP1616" name="delta_x" />
<field type="FP1616" name="delta_y" />
<field type="FP1616" name="delta_unaccel_x" />
<field type="FP1616" name="delta_unaccel_y" />
<field type="DeviceId" name="sourceid" altenum="Device" />
<pad bytes="2" />
<field type="ModifierInfo" name="mods" />
<field type="GroupInfo" name="group" />
<field type="CARD32" name="flags" mask="GestureSwipeEventFlags" />
</event>

<eventcopy name="GestureSwipeUpdate" number="31" ref="GestureSwipeBegin" />
<eventcopy name="GestureSwipeEnd" number="32" ref="GestureSwipeBegin" />

<!-- ⋅⋅⋅ Requests that depend on events ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->

<!-- SendExtensionEvent -->
Expand Down
8 changes: 4 additions & 4 deletions third_party/xcbproto/src/src/xprint.xml
Expand Up @@ -102,7 +102,7 @@ authorization from the authors.
<list type="STRING8" name="printer_name">
<fieldref>printerNameLen</fieldref>
</list>
<!-- There's some padding in here... -->
<pad align="4" />
<list type="STRING8" name="locale">
<fieldref>localeLen</fieldref>
</list>
Expand All @@ -125,7 +125,7 @@ authorization from the authors.
<list type="STRING8" name="printerName">
<fieldref>printerNameLen</fieldref>
</list>
<!-- padding -->
<pad align="4" />
<list type="STRING8" name="locale">
<fieldref>localeLen</fieldref>
</list>
Expand Down Expand Up @@ -177,11 +177,11 @@ authorization from the authors.
<list type="BYTE" name="data">
<fieldref>len_data</fieldref>
</list>
<!-- padding -->
<pad align="4" />
<list type="STRING8" name="doc_format">
<fieldref>len_fmt</fieldref>
</list>
<!-- padding -->
<pad align="4" />
<list type="STRING8" name="options">
<fieldref>len_options</fieldref>
</list>
Expand Down

0 comments on commit 523a0fc

Please sign in to comment.