diff --git a/third_party/xcbproto/README.chromium b/third_party/xcbproto/README.chromium
index 0f97b777c6fcac..8993074ba3b8f9 100644
--- a/third_party/xcbproto/README.chromium
+++ b/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
diff --git a/third_party/xcbproto/VERSION b/third_party/xcbproto/VERSION
index b64ae9b02d1935..626f0e2a4c2632 100644
--- a/third_party/xcbproto/VERSION
+++ b/third_party/xcbproto/VERSION
@@ -1 +1 @@
-496e3ce329c3cc9b32af4054c30fa0f306deb007
+70ca65fa35c3760661b090bc4b2601daa7a099b8
diff --git a/third_party/xcbproto/patch.diff b/third_party/xcbproto/patch.diff
index 2800338e07a803..1d72d6fb8deb03 100644
--- a/third_party/xcbproto/patch.diff
+++ b/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 @@
glx:WINDOW
@@ -292,8 +292,8 @@ diff -ru xcbproto/src/glx.xml src/src/glx.xml
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 @@
@@ -304,8 +304,8 @@ diff -ru xcbproto/src/present.xml src/src/present.xml
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 @@
- 6
@@ -479,8 +479,8 @@ diff -ru xcbproto/src/randr.xml src/src/randr.xml
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 @@
@@ -491,8 +491,8 @@ diff -ru xcbproto/src/shm.xml src/src/shm.xml
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 @@
devices_len
@@ -693,8 +693,8 @@ diff -ru xcbproto/src/xinput.xml src/src/xinput.xml
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 @@
- 66
- 67
@@ -737,15 +737,10 @@ diff -ru xcbproto/src/xproto.xml src/src/xproto.xml
-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.
'''
@@ -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
diff --git a/third_party/xcbproto/src/doc/xml-xcb.txt b/third_party/xcbproto/src/doc/xml-xcb.txt
index f5b9aed13ad7bd..baef734168015e 100644
--- a/third_party/xcbproto/src/doc/xml-xcb.txt
+++ b/third_party/xcbproto/src/doc/xml-xcb.txt
@@ -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.
structure contents
@@ -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.
+expression
+ 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 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.
+
This element represents a file descriptor field passed with the request. The
diff --git a/third_party/xcbproto/src/src/glx.xml b/third_party/xcbproto/src/src/glx.xml
index 70aa9f9fe0a9aa..6e728e2f01716b 100644
--- a/third_party/xcbproto/src/src/glx.xml
+++ b/third_party/xcbproto/src/src/glx.xml
@@ -489,6 +489,7 @@ The patch that fixed this server bug in X.org CVS is here:
gl_str_len
+
glx_str_len
@@ -525,6 +526,7 @@ The patch that fixed this server bug in X.org CVS is here:
gl_str_len
+
glx_str_len
diff --git a/third_party/xcbproto/src/src/xcb.xsd b/third_party/xcbproto/src/src/xcb.xsd
index dc3d7cc181c75b..86a51c53665fb7 100644
--- a/third_party/xcbproto/src/src/xcb.xsd
+++ b/third_party/xcbproto/src/src/xcb.xsd
@@ -101,6 +101,13 @@ authorization from the authors.
+
+
+
+
+
+
+
@@ -210,6 +217,7 @@ authorization from the authors.
+
diff --git a/third_party/xcbproto/src/src/xfixes.xml b/third_party/xcbproto/src/src/xfixes.xml
index 0a3d5ffeed4817..a01cd7b0c3de80 100644
--- a/third_party/xcbproto/src/src/xfixes.xml
+++ b/third_party/xcbproto/src/src/xfixes.xml
@@ -26,7 +26,7 @@ authorization from the authors.
-->
+ major-version="6" minor-version="0">
xproto
render
shape
@@ -359,4 +359,24 @@ authorization from the authors.
+
+
+
+
+ - 0
+ - 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/third_party/xcbproto/src/src/xinput.xml b/third_party/xcbproto/src/src/xinput.xml
index 33a93d2fe2d493..90db8f939f8d05 100644
--- a/third_party/xcbproto/src/src/xinput.xml
+++ b/third_party/xcbproto/src/src/xinput.xml
@@ -33,7 +33,7 @@ authorization from the authors.
-->
+ major-version="2" minor-version="4">
xfixes
xproto
@@ -1607,6 +1607,7 @@ authorization from the authors.
- 2
- 3
- 8
+ - 9
@@ -1680,6 +1681,14 @@ authorization from the authors.
+
+
+
+
+
+
+
+
@@ -1695,6 +1704,12 @@ authorization from the authors.
+
+
+ len
+ 4
+
+
@@ -1752,6 +1767,11 @@ authorization from the authors.
+
+ Gesture
+
+
+
@@ -1872,11 +1892,13 @@ authorization from the authors.
- - 0
- - 1
- - 2
- - 3
- - 4
+ - 0
+ - 1
+ - 2
+ - 3
+ - 4
+ - 5
+ - 6
@@ -2485,6 +2507,72 @@ authorization from the authors.
+
+
+
+ - 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/third_party/xcbproto/src/src/xprint.xml b/third_party/xcbproto/src/src/xprint.xml
index f9af65fa6046c9..fa3bb7ff1ff755 100644
--- a/third_party/xcbproto/src/src/xprint.xml
+++ b/third_party/xcbproto/src/src/xprint.xml
@@ -102,7 +102,7 @@ authorization from the authors.
printerNameLen
-
+
localeLen
@@ -125,7 +125,7 @@ authorization from the authors.
printerNameLen
-
+
localeLen
@@ -177,11 +177,11 @@ authorization from the authors.
len_data
-
+
len_fmt
-
+
len_options
diff --git a/third_party/xcbproto/src/src/xproto.xml b/third_party/xcbproto/src/src/xproto.xml
index 928a1c39c8c28a..21f332f18d52c4 100644
--- a/third_party/xcbproto/src/src/xproto.xml
+++ b/third_party/xcbproto/src/src/xproto.xml
@@ -2982,25 +2982,21 @@ results (no grabs are established) if there is a conflicting grab for any combin
]]>
-
@@ -3011,7 +3007,8 @@ Another client has already issued a GrabKey with the same button/key
combination on the same window.
]]>
= (3, 3):
+ from xml.etree.ElementTree import SubElement
+else:
+ from xml.etree.cElementTree import SubElement
+
import __main__
verbose_align_log = False
@@ -503,6 +510,8 @@ class ComplexType(Type):
Public fields added:
fields is an array of Field objects describing the structure fields.
+ length_expr is an expression that defines the length of the structure.
+
'''
def __init__(self, name, elt):
Type.__init__(self, name)
@@ -512,6 +521,7 @@ def __init__(self, name, elt):
self.nmemb = 1
self.size = 0
self.lenfield_parent = [self]
+ self.length_expr = None
# get required_start_alignment
required_start_align_element = elt.find("required_start_align")
@@ -573,6 +583,9 @@ def resolve(self, module):
type = module.get_type('INT32')
type.make_fd_of(module, self, fd_name)
continue
+ elif child.tag == 'length':
+ self.length_expr = Expression(list(child)[0], self)
+ continue
else:
# Hit this on Reply
continue
@@ -1346,6 +1359,15 @@ def __init__(self, name, elt):
if self.required_start_align is None:
self.required_start_align = Alignment(4,0)
+ # All errors are basically the same, but they still got different XML
+ # for historic reasons. This 'invents' the missing parts.
+ if len(self.elt) < 1:
+ SubElement(self.elt, "field", type="CARD32", name="bad_value")
+ if len(self.elt) < 2:
+ SubElement(self.elt, "field", type="CARD16", name="minor_opcode")
+ if len(self.elt) < 3:
+ SubElement(self.elt, "field", type="CARD8", name="major_opcode")
+
def add_opcode(self, opcode, name, main):
self.opcodes[name] = opcode
if main:
diff --git a/ui/gfx/x/generated_protos/damage.cc b/ui/gfx/x/generated_protos/damage.cc
index 81b27484005654..95044930a2d26e 100644
--- a/ui/gfx/x/generated_protos/damage.cc
+++ b/ui/gfx/x/generated_protos/damage.cc
@@ -56,7 +56,10 @@ Damage::Damage(Connection* connection, const x11::QueryExtensionReply& info)
std::string Damage::BadDamageError::ToString() const {
std::stringstream ss_;
ss_ << "Damage::BadDamageError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -67,6 +70,9 @@ void ReadError(Damage::BadDamageError* error_,
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -79,6 +85,15 @@ void ReadError(Damage::BadDamageError* error_,
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
template <>
diff --git a/ui/gfx/x/generated_protos/damage.h b/ui/gfx/x/generated_protos/damage.h
index 581e8a6f5e33ed..ceada070848bc1 100644
--- a/ui/gfx/x/generated_protos/damage.h
+++ b/ui/gfx/x/generated_protos/damage.h
@@ -92,6 +92,9 @@ class COMPONENT_EXPORT(X11) Damage {
struct BadDamageError : public x11::Error {
uint16_t sequence{};
+ uint32_t bad_value{};
+ uint16_t minor_opcode{};
+ uint8_t major_opcode{};
std::string ToString() const override;
};
diff --git a/ui/gfx/x/generated_protos/glx.cc b/ui/gfx/x/generated_protos/glx.cc
index f0adfb92465adc..dfb2fb31de6699 100644
--- a/ui/gfx/x/generated_protos/glx.cc
+++ b/ui/gfx/x/generated_protos/glx.cc
@@ -2797,6 +2797,9 @@ Future Glx::SetClientInfoARB(
buf.Write(&gl_extension_string_elem);
}
+ // pad0
+ Align(&buf, 4);
+
// glx_extension_string
DCHECK_EQ(static_cast(glx_str_len), glx_extension_string.size());
for (auto& glx_extension_string_elem : glx_extension_string) {
@@ -2956,6 +2959,9 @@ Future Glx::SetClientInfo2ARB(
buf.Write(&gl_extension_string_elem);
}
+ // pad0
+ Align(&buf, 4);
+
// glx_extension_string
DCHECK_EQ(static_cast(glx_str_len), glx_extension_string.size());
for (auto& glx_extension_string_elem : glx_extension_string) {
diff --git a/ui/gfx/x/generated_protos/randr.cc b/ui/gfx/x/generated_protos/randr.cc
index 1b83849a0d9ede..efa0905f0a2ccc 100644
--- a/ui/gfx/x/generated_protos/randr.cc
+++ b/ui/gfx/x/generated_protos/randr.cc
@@ -56,7 +56,10 @@ RandR::RandR(Connection* connection, const x11::QueryExtensionReply& info)
std::string RandR::BadOutputError::ToString() const {
std::stringstream ss_;
ss_ << "RandR::BadOutputError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -67,6 +70,9 @@ void ReadError(RandR::BadOutputError* error_,
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -79,12 +85,24 @@ void ReadError(RandR::BadOutputError* error_,
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
std::string RandR::BadCrtcError::ToString() const {
std::stringstream ss_;
ss_ << "RandR::BadCrtcError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -95,6 +113,9 @@ void ReadError(RandR::BadCrtcError* error_,
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -107,12 +128,24 @@ void ReadError(RandR::BadCrtcError* error_,
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
std::string RandR::BadModeError::ToString() const {
std::stringstream ss_;
ss_ << "RandR::BadModeError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -123,6 +156,9 @@ void ReadError(RandR::BadModeError* error_,
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -135,12 +171,24 @@ void ReadError(RandR::BadModeError* error_,
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
std::string RandR::BadProviderError::ToString() const {
std::stringstream ss_;
ss_ << "RandR::BadProviderError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -151,6 +199,9 @@ void ReadError(RandR::BadProviderError* error_,
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -163,6 +214,15 @@ void ReadError(RandR::BadProviderError* error_,
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
template <>
diff --git a/ui/gfx/x/generated_protos/randr.h b/ui/gfx/x/generated_protos/randr.h
index b79aa9aa63d19d..97839536b49993 100644
--- a/ui/gfx/x/generated_protos/randr.h
+++ b/ui/gfx/x/generated_protos/randr.h
@@ -167,24 +167,36 @@ class COMPONENT_EXPORT(X11) RandR {
struct BadOutputError : public x11::Error {
uint16_t sequence{};
+ uint32_t bad_value{};
+ uint16_t minor_opcode{};
+ uint8_t major_opcode{};
std::string ToString() const override;
};
struct BadCrtcError : public x11::Error {
uint16_t sequence{};
+ uint32_t bad_value{};
+ uint16_t minor_opcode{};
+ uint8_t major_opcode{};
std::string ToString() const override;
};
struct BadModeError : public x11::Error {
uint16_t sequence{};
+ uint32_t bad_value{};
+ uint16_t minor_opcode{};
+ uint8_t major_opcode{};
std::string ToString() const override;
};
struct BadProviderError : public x11::Error {
uint16_t sequence{};
+ uint32_t bad_value{};
+ uint16_t minor_opcode{};
+ uint8_t major_opcode{};
std::string ToString() const override;
};
diff --git a/ui/gfx/x/generated_protos/read_event.cc b/ui/gfx/x/generated_protos/read_event.cc
index bc58a45c01f5d5..ec344cf99153f6 100644
--- a/ui/gfx/x/generated_protos/read_event.cc
+++ b/ui/gfx/x/generated_protos/read_event.cc
@@ -622,9 +622,43 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
return;
}
+ if (evtype == GeGenericEvent::opcode && conn->xinput().present() &&
+ ge->extension == conn->xinput().major_opcode() &&
+ (ge->event_type == Input::GesturePinchEvent::Begin ||
+ ge->event_type == Input::GesturePinchEvent::Update ||
+ ge->event_type == Input::GesturePinchEvent::End)) {
+ event->type_id_ = 38;
+ event->deleter_ = [](void* event) {
+ delete reinterpret_cast(event);
+ };
+ auto* event_ = new Input::GesturePinchEvent;
+ ReadEvent(event_, buffer);
+ event_->opcode = static_castopcode)>(ge->event_type);
+ event->event_ = event_;
+ event->window_ = event_->GetWindow();
+ return;
+ }
+
+ if (evtype == GeGenericEvent::opcode && conn->xinput().present() &&
+ ge->extension == conn->xinput().major_opcode() &&
+ (ge->event_type == Input::GestureSwipeEvent::Begin ||
+ ge->event_type == Input::GestureSwipeEvent::Update ||
+ ge->event_type == Input::GestureSwipeEvent::End)) {
+ event->type_id_ = 39;
+ event->deleter_ = [](void* event) {
+ delete reinterpret_cast(event);
+ };
+ auto* event_ = new Input::GestureSwipeEvent;
+ ReadEvent(event_, buffer);
+ event_->opcode = static_castopcode)>(ge->event_type);
+ event->event_ = event_;
+ event->window_ = event_->GetWindow();
+ return;
+ }
+
if (conn->xkb().present() && evtype - conn->xkb().first_event() ==
Xkb::NewKeyboardNotifyEvent::opcode) {
- event->type_id_ = 38;
+ event->type_id_ = 40;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -637,7 +671,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
if (conn->xkb().present() &&
evtype - conn->xkb().first_event() == Xkb::MapNotifyEvent::opcode) {
- event->type_id_ = 39;
+ event->type_id_ = 41;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -650,7 +684,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
if (conn->xkb().present() &&
evtype - conn->xkb().first_event() == Xkb::StateNotifyEvent::opcode) {
- event->type_id_ = 40;
+ event->type_id_ = 42;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -663,7 +697,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
if (conn->xkb().present() &&
evtype - conn->xkb().first_event() == Xkb::ControlsNotifyEvent::opcode) {
- event->type_id_ = 41;
+ event->type_id_ = 43;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -676,7 +710,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
if (conn->xkb().present() && evtype - conn->xkb().first_event() ==
Xkb::IndicatorStateNotifyEvent::opcode) {
- event->type_id_ = 42;
+ event->type_id_ = 44;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -689,7 +723,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
if (conn->xkb().present() && evtype - conn->xkb().first_event() ==
Xkb::IndicatorMapNotifyEvent::opcode) {
- event->type_id_ = 43;
+ event->type_id_ = 45;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -702,7 +736,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
if (conn->xkb().present() &&
evtype - conn->xkb().first_event() == Xkb::NamesNotifyEvent::opcode) {
- event->type_id_ = 44;
+ event->type_id_ = 46;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -715,7 +749,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
if (conn->xkb().present() &&
evtype - conn->xkb().first_event() == Xkb::CompatMapNotifyEvent::opcode) {
- event->type_id_ = 45;
+ event->type_id_ = 47;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -728,7 +762,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
if (conn->xkb().present() &&
evtype - conn->xkb().first_event() == Xkb::BellNotifyEvent::opcode) {
- event->type_id_ = 46;
+ event->type_id_ = 48;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -741,7 +775,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
if (conn->xkb().present() &&
evtype - conn->xkb().first_event() == Xkb::ActionMessageEvent::opcode) {
- event->type_id_ = 47;
+ event->type_id_ = 49;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -754,7 +788,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
if (conn->xkb().present() &&
evtype - conn->xkb().first_event() == Xkb::AccessXNotifyEvent::opcode) {
- event->type_id_ = 48;
+ event->type_id_ = 50;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -767,7 +801,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
if (conn->xkb().present() && evtype - conn->xkb().first_event() ==
Xkb::ExtensionDeviceNotifyEvent::opcode) {
- event->type_id_ = 49;
+ event->type_id_ = 51;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -780,7 +814,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
if (conn->xprint().present() &&
evtype - conn->xprint().first_event() == XPrint::NotifyEvent::opcode) {
- event->type_id_ = 50;
+ event->type_id_ = 52;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -793,7 +827,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
if (conn->xprint().present() && evtype - conn->xprint().first_event() ==
XPrint::AttributNotifyEvent::opcode) {
- event->type_id_ = 51;
+ event->type_id_ = 53;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -805,7 +839,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if ((evtype == KeyEvent::Press || evtype == KeyEvent::Release)) {
- event->type_id_ = 52;
+ event->type_id_ = 54;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -818,7 +852,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if ((evtype == ButtonEvent::Press || evtype == ButtonEvent::Release)) {
- event->type_id_ = 53;
+ event->type_id_ = 55;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -831,7 +865,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == MotionNotifyEvent::opcode) {
- event->type_id_ = 54;
+ event->type_id_ = 56;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -844,7 +878,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
if ((evtype == CrossingEvent::EnterNotify ||
evtype == CrossingEvent::LeaveNotify)) {
- event->type_id_ = 55;
+ event->type_id_ = 57;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -857,7 +891,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if ((evtype == FocusEvent::In || evtype == FocusEvent::Out)) {
- event->type_id_ = 56;
+ event->type_id_ = 58;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -870,7 +904,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == KeymapNotifyEvent::opcode) {
- event->type_id_ = 57;
+ event->type_id_ = 59;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -882,7 +916,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == ExposeEvent::opcode) {
- event->type_id_ = 58;
+ event->type_id_ = 60;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -894,7 +928,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == GraphicsExposureEvent::opcode) {
- event->type_id_ = 59;
+ event->type_id_ = 61;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -906,7 +940,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == NoExposureEvent::opcode) {
- event->type_id_ = 60;
+ event->type_id_ = 62;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -918,7 +952,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == VisibilityNotifyEvent::opcode) {
- event->type_id_ = 61;
+ event->type_id_ = 63;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -930,7 +964,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == CreateNotifyEvent::opcode) {
- event->type_id_ = 62;
+ event->type_id_ = 64;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -942,7 +976,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == DestroyNotifyEvent::opcode) {
- event->type_id_ = 63;
+ event->type_id_ = 65;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -954,7 +988,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == UnmapNotifyEvent::opcode) {
- event->type_id_ = 64;
+ event->type_id_ = 66;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -966,7 +1000,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == MapNotifyEvent::opcode) {
- event->type_id_ = 65;
+ event->type_id_ = 67;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -978,7 +1012,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == MapRequestEvent::opcode) {
- event->type_id_ = 66;
+ event->type_id_ = 68;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -990,7 +1024,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == ReparentNotifyEvent::opcode) {
- event->type_id_ = 67;
+ event->type_id_ = 69;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -1002,7 +1036,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == ConfigureNotifyEvent::opcode) {
- event->type_id_ = 68;
+ event->type_id_ = 70;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -1014,7 +1048,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == ConfigureRequestEvent::opcode) {
- event->type_id_ = 69;
+ event->type_id_ = 71;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -1026,7 +1060,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == GravityNotifyEvent::opcode) {
- event->type_id_ = 70;
+ event->type_id_ = 72;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -1038,7 +1072,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == ResizeRequestEvent::opcode) {
- event->type_id_ = 71;
+ event->type_id_ = 73;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -1050,7 +1084,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if ((evtype == CirculateEvent::Notify || evtype == CirculateEvent::Request)) {
- event->type_id_ = 72;
+ event->type_id_ = 74;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -1063,7 +1097,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == PropertyNotifyEvent::opcode) {
- event->type_id_ = 73;
+ event->type_id_ = 75;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -1075,7 +1109,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == SelectionClearEvent::opcode) {
- event->type_id_ = 74;
+ event->type_id_ = 76;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -1087,7 +1121,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == SelectionRequestEvent::opcode) {
- event->type_id_ = 75;
+ event->type_id_ = 77;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -1099,7 +1133,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == SelectionNotifyEvent::opcode) {
- event->type_id_ = 76;
+ event->type_id_ = 78;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -1111,7 +1145,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == ColormapNotifyEvent::opcode) {
- event->type_id_ = 77;
+ event->type_id_ = 79;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -1123,7 +1157,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == ClientMessageEvent::opcode) {
- event->type_id_ = 78;
+ event->type_id_ = 80;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -1135,7 +1169,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
}
if (evtype == MappingNotifyEvent::opcode) {
- event->type_id_ = 79;
+ event->type_id_ = 81;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -1148,7 +1182,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
if (conn->xv().present() &&
evtype - conn->xv().first_event() == Xv::VideoNotifyEvent::opcode) {
- event->type_id_ = 81;
+ event->type_id_ = 83;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
@@ -1161,7 +1195,7 @@ void ReadEvent(Event* event, Connection* conn, ReadBuffer* buffer) {
if (conn->xv().present() &&
evtype - conn->xv().first_event() == Xv::PortNotifyEvent::opcode) {
- event->type_id_ = 82;
+ event->type_id_ = 84;
event->deleter_ = [](void* event) {
delete reinterpret_cast(event);
};
diff --git a/ui/gfx/x/generated_protos/record.cc b/ui/gfx/x/generated_protos/record.cc
index 356cce15c1ec7e..7465cae5296324 100644
--- a/ui/gfx/x/generated_protos/record.cc
+++ b/ui/gfx/x/generated_protos/record.cc
@@ -57,7 +57,9 @@ std::string Record::BadContextError::ToString() const {
std::stringstream ss_;
ss_ << "Record::BadContextError{";
ss_ << ".sequence = " << static_cast(sequence) << ", ";
- ss_ << ".invalid_record = " << static_cast(invalid_record);
+ ss_ << ".invalid_record = " << static_cast(invalid_record) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -69,6 +71,8 @@ void ReadError(Record::BadContextError* error_,
auto& sequence = (*error_).sequence;
auto& invalid_record = (*error_).invalid_record;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -84,6 +88,12 @@ void ReadError(Record::BadContextError* error_,
// invalid_record
Read(&invalid_record, &buf);
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
Future Record::QueryVersion(
diff --git a/ui/gfx/x/generated_protos/record.h b/ui/gfx/x/generated_protos/record.h
index bc45d19d2dcf3d..dccb50e6cf7866 100644
--- a/ui/gfx/x/generated_protos/record.h
+++ b/ui/gfx/x/generated_protos/record.h
@@ -158,6 +158,8 @@ class COMPONENT_EXPORT(X11) Record {
struct BadContextError : public x11::Error {
uint16_t sequence{};
uint32_t invalid_record{};
+ uint16_t minor_opcode{};
+ uint8_t major_opcode{};
std::string ToString() const override;
};
diff --git a/ui/gfx/x/generated_protos/render.cc b/ui/gfx/x/generated_protos/render.cc
index 7784a7b72fd0c2..6910596074316d 100644
--- a/ui/gfx/x/generated_protos/render.cc
+++ b/ui/gfx/x/generated_protos/render.cc
@@ -56,7 +56,10 @@ Render::Render(Connection* connection, const x11::QueryExtensionReply& info)
std::string Render::PictFormatError::ToString() const {
std::stringstream ss_;
ss_ << "Render::PictFormatError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -67,6 +70,9 @@ void ReadError(Render::PictFormatError* error_,
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -79,12 +85,24 @@ void ReadError(Render::PictFormatError* error_,
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
std::string Render::PictureError::ToString() const {
std::stringstream ss_;
ss_ << "Render::PictureError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -95,6 +113,9 @@ void ReadError(Render::PictureError* error_,
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -107,12 +128,24 @@ void ReadError(Render::PictureError* error_,
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
std::string Render::PictOpError::ToString() const {
std::stringstream ss_;
ss_ << "Render::PictOpError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -123,6 +156,9 @@ void ReadError(Render::PictOpError* error_,
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -135,12 +171,24 @@ void ReadError(Render::PictOpError* error_,
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
std::string Render::GlyphSetError::ToString() const {
std::stringstream ss_;
ss_ << "Render::GlyphSetError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -151,6 +199,9 @@ void ReadError(Render::GlyphSetError* error_,
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -163,12 +214,24 @@ void ReadError(Render::GlyphSetError* error_,
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
std::string Render::GlyphError::ToString() const {
std::stringstream ss_;
ss_ << "Render::GlyphError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -179,6 +242,9 @@ void ReadError(Render::GlyphError* error_,
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -191,6 +257,15 @@ void ReadError(Render::GlyphError* error_,
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
Future Render::QueryVersion(
diff --git a/ui/gfx/x/generated_protos/render.h b/ui/gfx/x/generated_protos/render.h
index ea70403380baf4..cd1aba16b585c0 100644
--- a/ui/gfx/x/generated_protos/render.h
+++ b/ui/gfx/x/generated_protos/render.h
@@ -197,30 +197,45 @@ class COMPONENT_EXPORT(X11) Render {
struct PictFormatError : public x11::Error {
uint16_t sequence{};
+ uint32_t bad_value{};
+ uint16_t minor_opcode{};
+ uint8_t major_opcode{};
std::string ToString() const override;
};
struct PictureError : public x11::Error {
uint16_t sequence{};
+ uint32_t bad_value{};
+ uint16_t minor_opcode{};
+ uint8_t major_opcode{};
std::string ToString() const override;
};
struct PictOpError : public x11::Error {
uint16_t sequence{};
+ uint32_t bad_value{};
+ uint16_t minor_opcode{};
+ uint8_t major_opcode{};
std::string ToString() const override;
};
struct GlyphSetError : public x11::Error {
uint16_t sequence{};
+ uint32_t bad_value{};
+ uint16_t minor_opcode{};
+ uint8_t major_opcode{};
std::string ToString() const override;
};
struct GlyphError : public x11::Error {
uint16_t sequence{};
+ uint32_t bad_value{};
+ uint16_t minor_opcode{};
+ uint8_t major_opcode{};
std::string ToString() const override;
};
diff --git a/ui/gfx/x/generated_protos/xf86vidmode.cc b/ui/gfx/x/generated_protos/xf86vidmode.cc
index 509cf8b649c57a..98fb120417cd63 100644
--- a/ui/gfx/x/generated_protos/xf86vidmode.cc
+++ b/ui/gfx/x/generated_protos/xf86vidmode.cc
@@ -57,7 +57,10 @@ XF86VidMode::XF86VidMode(Connection* connection,
std::string XF86VidMode::BadClockError::ToString() const {
std::stringstream ss_;
ss_ << "XF86VidMode::BadClockError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -68,6 +71,9 @@ void ReadError(XF86VidMode::BadClockError* error_,
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -80,12 +86,24 @@ void ReadError(XF86VidMode::BadClockError* error_,
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
std::string XF86VidMode::BadHTimingsError::ToString() const {
std::stringstream ss_;
ss_ << "XF86VidMode::BadHTimingsError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -97,6 +115,9 @@ void ReadError(
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -109,12 +130,24 @@ void ReadError(
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
std::string XF86VidMode::BadVTimingsError::ToString() const {
std::stringstream ss_;
ss_ << "XF86VidMode::BadVTimingsError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -126,6 +159,9 @@ void ReadError(
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -138,12 +174,24 @@ void ReadError(
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
std::string XF86VidMode::ModeUnsuitableError::ToString() const {
std::stringstream ss_;
ss_ << "XF86VidMode::ModeUnsuitableError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -155,6 +203,9 @@ void ReadError(
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -167,12 +218,24 @@ void ReadError(
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
std::string XF86VidMode::ExtensionDisabledError::ToString() const {
std::stringstream ss_;
ss_ << "XF86VidMode::ExtensionDisabledError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -184,6 +247,9 @@ void ReadError(
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -196,12 +262,24 @@ void ReadError(
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
std::string XF86VidMode::ClientNotLocalError::ToString() const {
std::stringstream ss_;
ss_ << "XF86VidMode::ClientNotLocalError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -213,6 +291,9 @@ void ReadError(
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -225,12 +306,24 @@ void ReadError(
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
std::string XF86VidMode::ZoomLockedError::ToString() const {
std::stringstream ss_;
ss_ << "XF86VidMode::ZoomLockedError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -242,6 +335,9 @@ void ReadError(
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -254,6 +350,15 @@ void ReadError(
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
Future XF86VidMode::QueryVersion(
diff --git a/ui/gfx/x/generated_protos/xf86vidmode.h b/ui/gfx/x/generated_protos/xf86vidmode.h
index f49b96cabb9df8..b85bfc46a6f0d1 100644
--- a/ui/gfx/x/generated_protos/xf86vidmode.h
+++ b/ui/gfx/x/generated_protos/xf86vidmode.h
@@ -135,42 +135,63 @@ class COMPONENT_EXPORT(X11) XF86VidMode {
struct BadClockError : public x11::Error {
uint16_t sequence{};
+ uint32_t bad_value{};
+ uint16_t minor_opcode{};
+ uint8_t major_opcode{};
std::string ToString() const override;
};
struct BadHTimingsError : public x11::Error {
uint16_t sequence{};
+ uint32_t bad_value{};
+ uint16_t minor_opcode{};
+ uint8_t major_opcode{};
std::string ToString() const override;
};
struct BadVTimingsError : public x11::Error {
uint16_t sequence{};
+ uint32_t bad_value{};
+ uint16_t minor_opcode{};
+ uint8_t major_opcode{};
std::string ToString() const override;
};
struct ModeUnsuitableError : public x11::Error {
uint16_t sequence{};
+ uint32_t bad_value{};
+ uint16_t minor_opcode{};
+ uint8_t major_opcode{};
std::string ToString() const override;
};
struct ExtensionDisabledError : public x11::Error {
uint16_t sequence{};
+ uint32_t bad_value{};
+ uint16_t minor_opcode{};
+ uint8_t major_opcode{};
std::string ToString() const override;
};
struct ClientNotLocalError : public x11::Error {
uint16_t sequence{};
+ uint32_t bad_value{};
+ uint16_t minor_opcode{};
+ uint8_t major_opcode{};
std::string ToString() const override;
};
struct ZoomLockedError : public x11::Error {
uint16_t sequence{};
+ uint32_t bad_value{};
+ uint16_t minor_opcode{};
+ uint8_t major_opcode{};
std::string ToString() const override;
};
diff --git a/ui/gfx/x/generated_protos/xfixes.cc b/ui/gfx/x/generated_protos/xfixes.cc
index e3b44e684e413d..f0ec6022c4c203 100644
--- a/ui/gfx/x/generated_protos/xfixes.cc
+++ b/ui/gfx/x/generated_protos/xfixes.cc
@@ -147,7 +147,10 @@ void ReadEvent(XFixes::CursorNotifyEvent* event_,
std::string XFixes::BadRegionError::ToString() const {
std::stringstream ss_;
ss_ << "XFixes::BadRegionError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -158,6 +161,9 @@ void ReadError(XFixes::BadRegionError* error_,
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -170,6 +176,15 @@ void ReadError(XFixes::BadRegionError* error_,
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
Future XFixes::QueryVersion(
@@ -1985,4 +2000,110 @@ Future XFixes::DeletePointerBarrier(const Barrier& barrier) {
XFixes::DeletePointerBarrierRequest{barrier});
}
+Future XFixes::SetClientDisconnectMode(
+ const XFixes::SetClientDisconnectModeRequest& request) {
+ if (!connection_->Ready() || !present())
+ return {};
+
+ WriteBuffer buf;
+
+ auto& disconnect_mode = request.disconnect_mode;
+
+ // major_opcode
+ uint8_t major_opcode = info_.major_opcode;
+ buf.Write(&major_opcode);
+
+ // minor_opcode
+ uint8_t minor_opcode = 33;
+ buf.Write(&minor_opcode);
+
+ // length
+ // Caller fills in length for writes.
+ Pad(&buf, sizeof(uint16_t));
+
+ // disconnect_mode
+ uint32_t tmp10;
+ tmp10 = static_cast(disconnect_mode);
+ buf.Write(&tmp10);
+
+ Align(&buf, 4);
+
+ return connection_->SendRequest(&buf, "XFixes::SetClientDisconnectMode",
+ false);
+}
+
+Future XFixes::SetClientDisconnectMode(
+ const ClientDisconnectFlags& disconnect_mode) {
+ return XFixes::SetClientDisconnectMode(
+ XFixes::SetClientDisconnectModeRequest{disconnect_mode});
+}
+
+Future XFixes::GetClientDisconnectMode(
+ const XFixes::GetClientDisconnectModeRequest& request) {
+ if (!connection_->Ready() || !present())
+ return {};
+
+ WriteBuffer buf;
+
+ // major_opcode
+ uint8_t major_opcode = info_.major_opcode;
+ buf.Write(&major_opcode);
+
+ // minor_opcode
+ uint8_t minor_opcode = 34;
+ buf.Write(&minor_opcode);
+
+ // length
+ // Caller fills in length for writes.
+ Pad(&buf, sizeof(uint16_t));
+
+ Align(&buf, 4);
+
+ return connection_->SendRequest(
+ &buf, "XFixes::GetClientDisconnectMode", false);
+}
+
+Future XFixes::GetClientDisconnectMode() {
+ return XFixes::GetClientDisconnectMode(
+ XFixes::GetClientDisconnectModeRequest{});
+}
+
+template <>
+COMPONENT_EXPORT(X11)
+std::unique_ptr detail::ReadReply<
+ XFixes::GetClientDisconnectModeReply>(ReadBuffer* buffer) {
+ auto& buf = *buffer;
+ auto reply = std::make_unique();
+
+ auto& sequence = (*reply).sequence;
+ auto& disconnect_mode = (*reply).disconnect_mode;
+
+ // response_type
+ uint8_t response_type;
+ Read(&response_type, &buf);
+
+ // pad0
+ Pad(&buf, 1);
+
+ // sequence
+ Read(&sequence, &buf);
+
+ // length
+ uint32_t length;
+ Read(&length, &buf);
+
+ // disconnect_mode
+ uint32_t tmp11;
+ Read(&tmp11, &buf);
+ disconnect_mode = static_cast(tmp11);
+
+ // pad1
+ Pad(&buf, 20);
+
+ Align(&buf, 4);
+ DCHECK_EQ(buf.offset < 32 ? 0 : buf.offset - 32, 4 * length);
+
+ return reply;
+}
+
} // namespace x11
diff --git a/ui/gfx/x/generated_protos/xfixes.h b/ui/gfx/x/generated_protos/xfixes.h
index 75385d0f44aedb..b0aa4b91b9229f 100644
--- a/ui/gfx/x/generated_protos/xfixes.h
+++ b/ui/gfx/x/generated_protos/xfixes.h
@@ -70,7 +70,7 @@ class Future;
class COMPONENT_EXPORT(X11) XFixes {
public:
- static constexpr unsigned major_version = 5;
+ static constexpr unsigned major_version = 6;
static constexpr unsigned minor_version = 0;
XFixes(Connection* connection, const x11::QueryExtensionReply& info);
@@ -130,6 +130,11 @@ class COMPONENT_EXPORT(X11) XFixes {
NegativeY = 1 << 3,
};
+ enum class ClientDisconnectFlags : int {
+ Default = 0,
+ Terminate = 1 << 0,
+ };
+
struct SelectionNotifyEvent {
static constexpr int type_id = 18;
static constexpr uint8_t opcode = 0;
@@ -159,6 +164,9 @@ class COMPONENT_EXPORT(X11) XFixes {
struct BadRegionError : public x11::Error {
uint16_t sequence{};
+ uint32_t bad_value{};
+ uint16_t minor_opcode{};
+ uint8_t major_opcode{};
std::string ToString() const override;
};
@@ -641,6 +649,33 @@ class COMPONENT_EXPORT(X11) XFixes {
Future DeletePointerBarrier(const Barrier& barrier = {});
+ struct SetClientDisconnectModeRequest {
+ ClientDisconnectFlags disconnect_mode{};
+ };
+
+ using SetClientDisconnectModeResponse = Response;
+
+ Future SetClientDisconnectMode(
+ const SetClientDisconnectModeRequest& request);
+
+ Future SetClientDisconnectMode(
+ const ClientDisconnectFlags& disconnect_mode = {});
+
+ struct GetClientDisconnectModeRequest {};
+
+ struct GetClientDisconnectModeReply {
+ uint16_t sequence{};
+ ClientDisconnectFlags disconnect_mode{};
+ };
+
+ using GetClientDisconnectModeResponse =
+ Response;
+
+ Future GetClientDisconnectMode(
+ const GetClientDisconnectModeRequest& request);
+
+ Future GetClientDisconnectMode();
+
private:
Connection* const connection_;
x11::QueryExtensionReply info_{};
@@ -790,4 +825,20 @@ inline constexpr x11::XFixes::BarrierDirections operator&(
static_cast(r));
}
+inline constexpr x11::XFixes::ClientDisconnectFlags operator|(
+ x11::XFixes::ClientDisconnectFlags l,
+ x11::XFixes::ClientDisconnectFlags r) {
+ using T = std::underlying_type_t;
+ return static_cast(static_cast(l) |
+ static_cast(r));
+}
+
+inline constexpr x11::XFixes::ClientDisconnectFlags operator&(
+ x11::XFixes::ClientDisconnectFlags l,
+ x11::XFixes::ClientDisconnectFlags r) {
+ using T = std::underlying_type_t;
+ return static_cast(static_cast(l) &
+ static_cast(r));
+}
+
#endif // UI_GFX_X_GENERATED_PROTOS_XFIXES_H_
diff --git a/ui/gfx/x/generated_protos/xinput.cc b/ui/gfx/x/generated_protos/xinput.cc
index a89a19833445f1..2c4abd63e608e5 100644
--- a/ui/gfx/x/generated_protos/xinput.cc
+++ b/ui/gfx/x/generated_protos/xinput.cc
@@ -734,6 +734,16 @@ void ReadEvent(Input::DeviceChangedEvent* event_,
// num_touches
Read(&num_touches, &buf);
}
+ if (CaseEq(data_expr, Input::DeviceClassType::Gesture)) {
+ data.gesture.emplace();
+ auto& num_touches = (*data.gesture).num_touches;
+
+ // num_touches
+ Read(&num_touches, &buf);
+
+ // pad2
+ Pad(&buf, 1);
+ }
}
}
@@ -1485,10 +1495,305 @@ void ReadEvent(Input::BarrierEvent* event_,
DCHECK_EQ(buf.offset, 32 + 4 * length);
}
+template <>
+COMPONENT_EXPORT(X11)
+void ReadEvent(Input::GesturePinchEvent* event_,
+ ReadBuffer* buffer) {
+ auto& buf = *buffer;
+
+ auto& sequence = (*event_).sequence;
+ auto& deviceid = (*event_).deviceid;
+ auto& time = (*event_).time;
+ auto& detail = (*event_).detail;
+ auto& root = (*event_).root;
+ auto& event = (*event_).event;
+ auto& child = (*event_).child;
+ auto& root_x = (*event_).root_x;
+ auto& root_y = (*event_).root_y;
+ auto& event_x = (*event_).event_x;
+ auto& event_y = (*event_).event_y;
+ auto& delta_x = (*event_).delta_x;
+ auto& delta_y = (*event_).delta_y;
+ auto& delta_unaccel_x = (*event_).delta_unaccel_x;
+ auto& delta_unaccel_y = (*event_).delta_unaccel_y;
+ auto& scale = (*event_).scale;
+ auto& delta_angle = (*event_).delta_angle;
+ auto& sourceid = (*event_).sourceid;
+ auto& mods = (*event_).mods;
+ auto& group = (*event_).group;
+ auto& flags = (*event_).flags;
+
+ // response_type
+ uint8_t response_type;
+ Read(&response_type, &buf);
+
+ // extension
+ uint8_t extension;
+ Read(&extension, &buf);
+
+ // sequence
+ Read(&sequence, &buf);
+
+ // length
+ uint32_t length;
+ Read(&length, &buf);
+
+ // event_type
+ uint16_t event_type;
+ Read(&event_type, &buf);
+
+ // deviceid
+ Read(&deviceid, &buf);
+
+ // time
+ Read(&time, &buf);
+
+ // detail
+ Read(&detail, &buf);
+
+ // root
+ Read(&root, &buf);
+
+ // event
+ Read(&event, &buf);
+
+ // child
+ Read(&child, &buf);
+
+ // root_x
+ Read(&root_x, &buf);
+
+ // root_y
+ Read(&root_y, &buf);
+
+ // event_x
+ Read(&event_x, &buf);
+
+ // event_y
+ Read(&event_y, &buf);
+
+ // delta_x
+ Read(&delta_x, &buf);
+
+ // delta_y
+ Read(&delta_y, &buf);
+
+ // delta_unaccel_x
+ Read(&delta_unaccel_x, &buf);
+
+ // delta_unaccel_y
+ Read(&delta_unaccel_y, &buf);
+
+ // scale
+ Read(&scale, &buf);
+
+ // delta_angle
+ Read(&delta_angle, &buf);
+
+ // sourceid
+ Read(&sourceid, &buf);
+
+ // pad0
+ Pad(&buf, 2);
+
+ // mods
+ {
+ auto& base = mods.base;
+ auto& latched = mods.latched;
+ auto& locked = mods.locked;
+ auto& effective = mods.effective;
+
+ // base
+ Read(&base, &buf);
+
+ // latched
+ Read(&latched, &buf);
+
+ // locked
+ Read(&locked, &buf);
+
+ // effective
+ Read(&effective, &buf);
+ }
+
+ // group
+ {
+ auto& base = group.base;
+ auto& latched = group.latched;
+ auto& locked = group.locked;
+ auto& effective = group.effective;
+
+ // base
+ Read(&base, &buf);
+
+ // latched
+ Read(&latched, &buf);
+
+ // locked
+ Read(&locked, &buf);
+
+ // effective
+ Read(&effective, &buf);
+ }
+
+ // flags
+ uint32_t tmp27;
+ Read(&tmp27, &buf);
+ flags = static_cast(tmp27);
+
+ Align(&buf, 4);
+ DCHECK_EQ(buf.offset, 32 + 4 * length);
+}
+
+template <>
+COMPONENT_EXPORT(X11)
+void ReadEvent(Input::GestureSwipeEvent* event_,
+ ReadBuffer* buffer) {
+ auto& buf = *buffer;
+
+ auto& sequence = (*event_).sequence;
+ auto& deviceid = (*event_).deviceid;
+ auto& time = (*event_).time;
+ auto& detail = (*event_).detail;
+ auto& root = (*event_).root;
+ auto& event = (*event_).event;
+ auto& child = (*event_).child;
+ auto& root_x = (*event_).root_x;
+ auto& root_y = (*event_).root_y;
+ auto& event_x = (*event_).event_x;
+ auto& event_y = (*event_).event_y;
+ auto& delta_x = (*event_).delta_x;
+ auto& delta_y = (*event_).delta_y;
+ auto& delta_unaccel_x = (*event_).delta_unaccel_x;
+ auto& delta_unaccel_y = (*event_).delta_unaccel_y;
+ auto& sourceid = (*event_).sourceid;
+ auto& mods = (*event_).mods;
+ auto& group = (*event_).group;
+ auto& flags = (*event_).flags;
+
+ // response_type
+ uint8_t response_type;
+ Read(&response_type, &buf);
+
+ // extension
+ uint8_t extension;
+ Read(&extension, &buf);
+
+ // sequence
+ Read(&sequence, &buf);
+
+ // length
+ uint32_t length;
+ Read(&length, &buf);
+
+ // event_type
+ uint16_t event_type;
+ Read(&event_type, &buf);
+
+ // deviceid
+ Read(&deviceid, &buf);
+
+ // time
+ Read(&time, &buf);
+
+ // detail
+ Read(&detail, &buf);
+
+ // root
+ Read(&root, &buf);
+
+ // event
+ Read(&event, &buf);
+
+ // child
+ Read(&child, &buf);
+
+ // root_x
+ Read(&root_x, &buf);
+
+ // root_y
+ Read(&root_y, &buf);
+
+ // event_x
+ Read(&event_x, &buf);
+
+ // event_y
+ Read(&event_y, &buf);
+
+ // delta_x
+ Read(&delta_x, &buf);
+
+ // delta_y
+ Read(&delta_y, &buf);
+
+ // delta_unaccel_x
+ Read(&delta_unaccel_x, &buf);
+
+ // delta_unaccel_y
+ Read(&delta_unaccel_y, &buf);
+
+ // sourceid
+ Read(&sourceid, &buf);
+
+ // pad0
+ Pad(&buf, 2);
+
+ // mods
+ {
+ auto& base = mods.base;
+ auto& latched = mods.latched;
+ auto& locked = mods.locked;
+ auto& effective = mods.effective;
+
+ // base
+ Read(&base, &buf);
+
+ // latched
+ Read(&latched, &buf);
+
+ // locked
+ Read(&locked, &buf);
+
+ // effective
+ Read(&effective, &buf);
+ }
+
+ // group
+ {
+ auto& base = group.base;
+ auto& latched = group.latched;
+ auto& locked = group.locked;
+ auto& effective = group.effective;
+
+ // base
+ Read(&base, &buf);
+
+ // latched
+ Read(&latched, &buf);
+
+ // locked
+ Read(&locked, &buf);
+
+ // effective
+ Read(&effective, &buf);
+ }
+
+ // flags
+ uint32_t tmp28;
+ Read(&tmp28, &buf);
+ flags = static_cast(tmp28);
+
+ Align(&buf, 4);
+ DCHECK_EQ(buf.offset, 32 + 4 * length);
+}
+
std::string Input::DeviceError::ToString() const {
std::stringstream ss_;
ss_ << "Input::DeviceError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -1499,6 +1804,9 @@ void ReadError(Input::DeviceError* error_,
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -1511,12 +1819,24 @@ void ReadError(Input::DeviceError* error_,
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
std::string Input::EventError::ToString() const {
std::stringstream ss_;
ss_ << "Input::EventError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -1527,6 +1847,9 @@ void ReadError(Input::EventError* error_,
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -1539,12 +1862,24 @@ void ReadError(Input::EventError* error_,
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
std::string Input::ModeError::ToString() const {
std::stringstream ss_;
ss_ << "Input::ModeError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -1554,6 +1889,9 @@ void ReadError(Input::ModeError* error_, ReadBuffer* buffer) {
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -1566,12 +1904,24 @@ void ReadError(Input::ModeError* error_, ReadBuffer* buffer) {
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
std::string Input::DeviceBusyError::ToString() const {
std::stringstream ss_;
ss_ << "Input::DeviceBusyError{";
- ss_ << ".sequence = " << static_cast(sequence);
+ ss_ << ".sequence = " << static_cast(sequence) << ", ";
+ ss_ << ".bad_value = " << static_cast(bad_value) << ", ";
+ ss_ << ".minor_opcode = " << static_cast(minor_opcode) << ", ";
+ ss_ << ".major_opcode = " << static_cast(major_opcode);
ss_ << "}";
return ss_.str();
}
@@ -1582,6 +1932,9 @@ void ReadError(Input::DeviceBusyError* error_,
auto& buf = *buffer;
auto& sequence = (*error_).sequence;
+ auto& bad_value = (*error_).bad_value;
+ auto& minor_opcode = (*error_).minor_opcode;
+ auto& major_opcode = (*error_).major_opcode;
// response_type
uint8_t response_type;
@@ -1594,12 +1947,24 @@ void ReadError(Input::DeviceBusyError* error_,
// sequence
Read(&sequence, &buf);
+ // bad_value
+ Read(&bad_value, &buf);
+
+ // minor_opcode
+ Read(&minor_opcode, &buf);
+
+ // major_opcode
+ Read(&major_opcode, &buf);
+
DCHECK_LE(buf.offset, 32ul);
}
std::string Input::ClassError::ToString() const {
std::stringstream ss_;
ss_ << "Input::ClassError{";
- ss_ << ".sequence = " << static_cast