summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/xcb/libxcb
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/xcb/libxcb')
-rw-r--r--src/3rdparty/xcb/libxcb/touchpad-gestures-c.patch78
-rw-r--r--src/3rdparty/xcb/libxcb/xinput-device-class-sizeof.patch38
-rw-r--r--src/3rdparty/xcb/libxcb/xinput.c72
3 files changed, 162 insertions, 26 deletions
diff --git a/src/3rdparty/xcb/libxcb/touchpad-gestures-c.patch b/src/3rdparty/xcb/libxcb/touchpad-gestures-c.patch
new file mode 100644
index 0000000000..4e575fbc3e
--- /dev/null
+++ b/src/3rdparty/xcb/libxcb/touchpad-gestures-c.patch
@@ -0,0 +1,78 @@
+diff --git a/src/3rdparty/xcb/libxcb/xinput.c b/src/3rdparty/xcb/libxcb/xinput.c
+index 5113213a61..4991d6e7b3 100644
+--- a/src/3rdparty/xcb/libxcb/xinput.c
++++ b/src/3rdparty/xcb/libxcb/xinput.c
+@@ -10058,6 +10058,24 @@ xcb_input_touch_class_end (xcb_input_touch_class_iterator_t i)
+ return ret;
+ }
+
++void
++xcb_input_gesture_class_next (xcb_input_gesture_class_iterator_t *i)
++{
++ --i->rem;
++ ++i->data;
++ i->index += sizeof(xcb_input_gesture_class_t);
++}
++
++xcb_generic_iterator_t
++xcb_input_gesture_class_end (xcb_input_gesture_class_iterator_t i)
++{
++ xcb_generic_iterator_t ret;
++ ret.data = i.data + i.rem;
++ ret.index = i.index + ((char *) ret.data - (char *) i.data);
++ ret.rem = 0;
++ return ret;
++}
++
+ void
+ xcb_input_valuator_class_next (xcb_input_valuator_class_iterator_t *i)
+ {
+@@ -10160,7 +10178,7 @@ xcb_input_device_class_data_serialize (void **_bu
+
+ unsigned int xcb_pad = 0;
+ char xcb_pad0[3] = {0, 0, 0};
+- struct iovec xcb_parts[24];
++ struct iovec xcb_parts[26];
+ unsigned int xcb_parts_idx = 0;
+ unsigned int xcb_block_len = 0;
+ unsigned int i;
+@@ -10329,6 +10347,20 @@ xcb_input_device_class_data_serialize (void **_bu
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
++ if(type == XCB_INPUT_DEVICE_CLASS_TYPE_GESTURE) {
++ /* xcb_input_device_class_data_t.gesture.num_touches */
++ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->gesture.num_touches;
++ xcb_block_len += sizeof(uint8_t);
++ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
++ xcb_parts_idx++;
++ xcb_align_to = ALIGNOF(uint8_t);
++ /* xcb_input_device_class_data_t.gesture.pad2 */
++ xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad;
++ xcb_block_len += sizeof(uint8_t);
++ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
++ xcb_parts_idx++;
++ xcb_align_to = ALIGNOF(uint8_t);
++ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
+@@ -10511,6 +10543,18 @@ xcb_input_device_class_data_unpack (const void *_buffer,
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
++ if(type == XCB_INPUT_DEVICE_CLASS_TYPE_GESTURE) {
++ /* xcb_input_device_class_data_t.gesture.num_touches */
++ _aux->gesture.num_touches = *(uint8_t *)xcb_tmp;
++ xcb_block_len += sizeof(uint8_t);
++ xcb_tmp += sizeof(uint8_t);
++ xcb_align_to = ALIGNOF(uint8_t);
++ /* xcb_input_device_class_data_t.gesture.pad2 */
++ _aux->gesture.pad2 = *(uint8_t *)xcb_tmp;
++ xcb_block_len += sizeof(uint8_t);
++ xcb_tmp += sizeof(uint8_t);
++ xcb_align_to = ALIGNOF(uint8_t);
++ }
+ /* insert padding */
+ xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - 1);
+ xcb_buffer_len += xcb_block_len + xcb_pad;
diff --git a/src/3rdparty/xcb/libxcb/xinput-device-class-sizeof.patch b/src/3rdparty/xcb/libxcb/xinput-device-class-sizeof.patch
new file mode 100644
index 0000000000..2eacd7f3d2
--- /dev/null
+++ b/src/3rdparty/xcb/libxcb/xinput-device-class-sizeof.patch
@@ -0,0 +1,38 @@
+diff --git a/src/3rdparty/xcb/libxcb/xinput.c b/src/3rdparty/xcb/libxcb/xinput.c
+index d4e3c250bc..5113213a61 100644
+--- a/src/3rdparty/xcb/libxcb/xinput.c
++++ b/src/3rdparty/xcb/libxcb/xinput.c
+@@ -10535,32 +10535,8 @@ xcb_input_device_class_data_sizeof (const void *_buffer,
+ int
+ xcb_input_device_class_sizeof (const void *_buffer)
+ {
+- char *xcb_tmp = (char *)_buffer;
+ const xcb_input_device_class_t *_aux = (xcb_input_device_class_t *)_buffer;
+- unsigned int xcb_buffer_len = 0;
+- unsigned int xcb_block_len = 0;
+- unsigned int xcb_pad = 0;
+- unsigned int xcb_align_to = 0;
+-
+-
+- xcb_block_len += sizeof(xcb_input_device_class_t);
+- xcb_tmp += xcb_block_len;
+- xcb_buffer_len += xcb_block_len;
+- xcb_block_len = 0;
+- /* data */
+- xcb_block_len += xcb_input_device_class_data_sizeof(xcb_tmp, _aux->type);
+- xcb_tmp += xcb_block_len;
+- xcb_align_to = ALIGNOF(char);
+- /* insert padding */
+- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
+- xcb_buffer_len += xcb_block_len + xcb_pad;
+- if (0 != xcb_pad) {
+- xcb_tmp += xcb_pad;
+- xcb_pad = 0;
+- }
+- xcb_block_len = 0;
+-
+- return xcb_buffer_len;
++ return (_aux->len * 4);
+ }
+
+ void *
diff --git a/src/3rdparty/xcb/libxcb/xinput.c b/src/3rdparty/xcb/libxcb/xinput.c
index d4e3c250bc..4991d6e7b3 100644
--- a/src/3rdparty/xcb/libxcb/xinput.c
+++ b/src/3rdparty/xcb/libxcb/xinput.c
@@ -10059,6 +10059,24 @@ xcb_input_touch_class_end (xcb_input_touch_class_iterator_t i)
}
void
+xcb_input_gesture_class_next (xcb_input_gesture_class_iterator_t *i)
+{
+ --i->rem;
+ ++i->data;
+ i->index += sizeof(xcb_input_gesture_class_t);
+}
+
+xcb_generic_iterator_t
+xcb_input_gesture_class_end (xcb_input_gesture_class_iterator_t i)
+{
+ xcb_generic_iterator_t ret;
+ ret.data = i.data + i.rem;
+ ret.index = i.index + ((char *) ret.data - (char *) i.data);
+ ret.rem = 0;
+ return ret;
+}
+
+void
xcb_input_valuator_class_next (xcb_input_valuator_class_iterator_t *i)
{
--i->rem;
@@ -10160,7 +10178,7 @@ xcb_input_device_class_data_serialize (void **_bu
unsigned int xcb_pad = 0;
char xcb_pad0[3] = {0, 0, 0};
- struct iovec xcb_parts[24];
+ struct iovec xcb_parts[26];
unsigned int xcb_parts_idx = 0;
unsigned int xcb_block_len = 0;
unsigned int i;
@@ -10329,6 +10347,20 @@ xcb_input_device_class_data_serialize (void **_bu
xcb_parts_idx++;
xcb_align_to = ALIGNOF(uint8_t);
}
+ if(type == XCB_INPUT_DEVICE_CLASS_TYPE_GESTURE) {
+ /* xcb_input_device_class_data_t.gesture.num_touches */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->gesture.num_touches;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_device_class_data_t.gesture.pad2 */
+ xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
+ xcb_parts_idx++;
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
/* insert padding */
xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - 1);
xcb_buffer_len += xcb_block_len + xcb_pad;
@@ -10511,6 +10543,18 @@ xcb_input_device_class_data_unpack (const void *_buffer,
xcb_tmp += sizeof(uint8_t);
xcb_align_to = ALIGNOF(uint8_t);
}
+ if(type == XCB_INPUT_DEVICE_CLASS_TYPE_GESTURE) {
+ /* xcb_input_device_class_data_t.gesture.num_touches */
+ _aux->gesture.num_touches = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ /* xcb_input_device_class_data_t.gesture.pad2 */
+ _aux->gesture.pad2 = *(uint8_t *)xcb_tmp;
+ xcb_block_len += sizeof(uint8_t);
+ xcb_tmp += sizeof(uint8_t);
+ xcb_align_to = ALIGNOF(uint8_t);
+ }
/* insert padding */
xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - 1);
xcb_buffer_len += xcb_block_len + xcb_pad;
@@ -10535,32 +10579,8 @@ xcb_input_device_class_data_sizeof (const void *_buffer,
int
xcb_input_device_class_sizeof (const void *_buffer)
{
- char *xcb_tmp = (char *)_buffer;
const xcb_input_device_class_t *_aux = (xcb_input_device_class_t *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
-
- xcb_block_len += sizeof(xcb_input_device_class_t);
- xcb_tmp += xcb_block_len;
- xcb_buffer_len += xcb_block_len;
- xcb_block_len = 0;
- /* data */
- xcb_block_len += xcb_input_device_class_data_sizeof(xcb_tmp, _aux->type);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(char);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
+ return (_aux->len * 4);
}
void *