3rdparty: Add touchpad gestures support to bundled xinput xcb module
This feature can easily be backported to our bundled version of libxcb because the feature is pretty much self-contained (just a couple of new events and parsing support) and does not depend on newer features of libxcb that have appeared since our bundled version of 1.13. Change-Id: If965e3de8b898286cd61c7fddbf335894f3a3ff5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>bb10
parent
2a2fb306b8
commit
746644a5a9
|
|
@ -8,12 +8,18 @@ The following parts were removed from it:
|
|||
- SendExtensionEvent API (requires definition of xcb_raw_generic_event_t
|
||||
from libxcb 1.13)
|
||||
|
||||
The following has been added:
|
||||
- A fix for forwards compatibility bug with X Server 21.1 (see below)
|
||||
- Touchpad gesture support (see below)
|
||||
|
||||
*****************************************************************
|
||||
|
||||
As of time of writing the minimal required libxcb version is 1.11, hence
|
||||
we could restore the Pointer Barriers API, but we don't use it, so it is
|
||||
not worth the hustle. When we will bump the minimal required version of libxcb
|
||||
to 1.13, then we can drop the bundled xcb-xinput altogether.
|
||||
we could restore the Pointer Barriers API, but we don't use it.
|
||||
Additionally, we support touchpad gestures which is a much newer addition
|
||||
to libxcb, but fortunately very well contained. When we will bump the
|
||||
minimal required version of libxcb to 1.15, then we can drop the bundled
|
||||
xcb-xinput altogether.
|
||||
|
||||
The xcb-xinput files where modified to use system includes, see:
|
||||
|
||||
|
|
@ -22,7 +28,7 @@ src/3rdparty/xcb/libxcb/fixup-xinput-c.patch
|
|||
|
||||
*****************************************************************
|
||||
|
||||
Additionally, a forwards compatibility bug in libxcb xinput has been addressed
|
||||
A forwards compatibility bug in libxcb xinput has been addressed
|
||||
by the following patch:
|
||||
|
||||
src/3rdparty/xcb/libxcb/xinput-device-class-sizeof.patch
|
||||
|
|
@ -44,3 +50,17 @@ The request for XI 2.4 disables the workaround on the X server and Qt side would
|
|||
crash horribly.
|
||||
|
||||
For more details, see https://gitlab.freedesktop.org/xorg/lib/libxcb/-/merge_requests/20
|
||||
|
||||
*****************************************************************
|
||||
|
||||
Touchpad gestures support has been added in the following patches:
|
||||
|
||||
src/3rdparty/xcb/include/xcb/touchpad-gestures-h.patch
|
||||
src/3rdparty/xcb/libxcb/touchpad-gestures-c.patch
|
||||
|
||||
The patches were generated by cherry-picking
|
||||
151ee69847c706e2b9d38c82e20534910f140b55 from xcb-xcbproto master on top of 1.13,
|
||||
generating xinput.h and xinput.c files and comparing to what would be generated in
|
||||
vanilla libxcb 1.13 and xcb-proto 1.13.
|
||||
|
||||
For more details, see https://gitlab.freedesktop.org/xorg/proto/xcbproto/-/merge_requests/16
|
||||
|
|
|
|||
|
|
@ -0,0 +1,207 @@
|
|||
diff --git a/src/3rdparty/xcb/include/xcb/xinput.h b/src/3rdparty/xcb/include/xcb/xinput.h
|
||||
index 729c0b5169..f2e38bb920 100644
|
||||
--- a/src/3rdparty/xcb/include/xcb/xinput.h
|
||||
+++ b/src/3rdparty/xcb/include/xcb/xinput.h
|
||||
@@ -20,7 +20,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#define XCB_INPUT_MAJOR_VERSION 2
|
||||
-#define XCB_INPUT_MINOR_VERSION 3
|
||||
+#define XCB_INPUT_MINOR_VERSION 4
|
||||
|
||||
extern xcb_extension_t xcb_input_id;
|
||||
|
||||
@@ -2671,7 +2671,8 @@ typedef enum xcb_input_device_class_type_t {
|
||||
XCB_INPUT_DEVICE_CLASS_TYPE_BUTTON = 1,
|
||||
XCB_INPUT_DEVICE_CLASS_TYPE_VALUATOR = 2,
|
||||
XCB_INPUT_DEVICE_CLASS_TYPE_SCROLL = 3,
|
||||
- XCB_INPUT_DEVICE_CLASS_TYPE_TOUCH = 8
|
||||
+ XCB_INPUT_DEVICE_CLASS_TYPE_TOUCH = 8,
|
||||
+ XCB_INPUT_DEVICE_CLASS_TYPE_GESTURE = 9
|
||||
} xcb_input_device_class_type_t;
|
||||
|
||||
typedef enum xcb_input_device_type_t {
|
||||
@@ -2778,6 +2779,26 @@ typedef struct xcb_input_touch_class_iterator_t {
|
||||
int index;
|
||||
} xcb_input_touch_class_iterator_t;
|
||||
|
||||
+/**
|
||||
+ * @brief xcb_input_gesture_class_t
|
||||
+ **/
|
||||
+typedef struct xcb_input_gesture_class_t {
|
||||
+ uint16_t type;
|
||||
+ uint16_t len;
|
||||
+ xcb_input_device_id_t sourceid;
|
||||
+ uint8_t num_touches;
|
||||
+ uint8_t pad0;
|
||||
+} xcb_input_gesture_class_t;
|
||||
+
|
||||
+/**
|
||||
+ * @brief xcb_input_gesture_class_iterator_t
|
||||
+ **/
|
||||
+typedef struct xcb_input_gesture_class_iterator_t {
|
||||
+ xcb_input_gesture_class_t *data;
|
||||
+ int rem;
|
||||
+ int index;
|
||||
+} xcb_input_gesture_class_iterator_t;
|
||||
+
|
||||
/**
|
||||
* @brief xcb_input_valuator_class_t
|
||||
**/
|
||||
@@ -2838,6 +2859,10 @@ typedef struct xcb_input_device_class_data_t {
|
||||
uint8_t mode;
|
||||
uint8_t num_touches;
|
||||
} touch;
|
||||
+ struct {
|
||||
+ uint8_t num_touches;
|
||||
+ uint8_t pad2;
|
||||
+ } gesture;
|
||||
} xcb_input_device_class_data_t;
|
||||
|
||||
/**
|
||||
@@ -3065,7 +3090,9 @@ typedef enum xcb_input_grab_type_t {
|
||||
XCB_INPUT_GRAB_TYPE_KEYCODE = 1,
|
||||
XCB_INPUT_GRAB_TYPE_ENTER = 2,
|
||||
XCB_INPUT_GRAB_TYPE_FOCUS_IN = 3,
|
||||
- XCB_INPUT_GRAB_TYPE_TOUCH_BEGIN = 4
|
||||
+ XCB_INPUT_GRAB_TYPE_TOUCH_BEGIN = 4,
|
||||
+ XCB_INPUT_GRAB_TYPE_GESTURE_PINCH_BEGIN = 5,
|
||||
+ XCB_INPUT_GRAB_TYPE_GESTURE_SWIPE_BEGIN = 6
|
||||
} xcb_input_grab_type_t;
|
||||
|
||||
typedef enum xcb_input_modifier_mask_t {
|
||||
@@ -4028,6 +4055,104 @@ typedef struct xcb_input_class_error_t {
|
||||
uint16_t sequence;
|
||||
} xcb_input_class_error_t;
|
||||
|
||||
+typedef enum xcb_input_gesture_pinch_event_flags_t {
|
||||
+ XCB_INPUT_GESTURE_PINCH_EVENT_FLAGS_GESTURE_PINCH_CANCELLED = 1
|
||||
+} xcb_input_gesture_pinch_event_flags_t;
|
||||
+
|
||||
+/** Opcode for xcb_input_gesture_pinch_begin. */
|
||||
+#define XCB_INPUT_GESTURE_PINCH_BEGIN 27
|
||||
+
|
||||
+/**
|
||||
+ * @brief xcb_input_gesture_pinch_begin_event_t
|
||||
+ **/
|
||||
+typedef struct xcb_input_gesture_pinch_begin_event_t {
|
||||
+ uint8_t response_type;
|
||||
+ uint8_t extension;
|
||||
+ uint16_t sequence;
|
||||
+ uint32_t length;
|
||||
+ uint16_t event_type;
|
||||
+ xcb_input_device_id_t deviceid;
|
||||
+ xcb_timestamp_t time;
|
||||
+ uint32_t detail;
|
||||
+ xcb_window_t root;
|
||||
+ xcb_window_t event;
|
||||
+ xcb_window_t child;
|
||||
+ uint32_t full_sequence;
|
||||
+ xcb_input_fp1616_t root_x;
|
||||
+ xcb_input_fp1616_t root_y;
|
||||
+ xcb_input_fp1616_t event_x;
|
||||
+ xcb_input_fp1616_t event_y;
|
||||
+ xcb_input_fp1616_t delta_x;
|
||||
+ xcb_input_fp1616_t delta_y;
|
||||
+ xcb_input_fp1616_t delta_unaccel_x;
|
||||
+ xcb_input_fp1616_t delta_unaccel_y;
|
||||
+ xcb_input_fp1616_t scale;
|
||||
+ xcb_input_fp1616_t delta_angle;
|
||||
+ xcb_input_device_id_t sourceid;
|
||||
+ uint8_t pad0[2];
|
||||
+ xcb_input_modifier_info_t mods;
|
||||
+ xcb_input_group_info_t group;
|
||||
+ uint32_t flags;
|
||||
+} xcb_input_gesture_pinch_begin_event_t;
|
||||
+
|
||||
+/** Opcode for xcb_input_gesture_pinch_update. */
|
||||
+#define XCB_INPUT_GESTURE_PINCH_UPDATE 28
|
||||
+
|
||||
+typedef xcb_input_gesture_pinch_begin_event_t xcb_input_gesture_pinch_update_event_t;
|
||||
+
|
||||
+/** Opcode for xcb_input_gesture_pinch_end. */
|
||||
+#define XCB_INPUT_GESTURE_PINCH_END 29
|
||||
+
|
||||
+typedef xcb_input_gesture_pinch_begin_event_t xcb_input_gesture_pinch_end_event_t;
|
||||
+
|
||||
+typedef enum xcb_input_gesture_swipe_event_flags_t {
|
||||
+ XCB_INPUT_GESTURE_SWIPE_EVENT_FLAGS_GESTURE_SWIPE_CANCELLED = 1
|
||||
+} xcb_input_gesture_swipe_event_flags_t;
|
||||
+
|
||||
+/** Opcode for xcb_input_gesture_swipe_begin. */
|
||||
+#define XCB_INPUT_GESTURE_SWIPE_BEGIN 30
|
||||
+
|
||||
+/**
|
||||
+ * @brief xcb_input_gesture_swipe_begin_event_t
|
||||
+ **/
|
||||
+typedef struct xcb_input_gesture_swipe_begin_event_t {
|
||||
+ uint8_t response_type;
|
||||
+ uint8_t extension;
|
||||
+ uint16_t sequence;
|
||||
+ uint32_t length;
|
||||
+ uint16_t event_type;
|
||||
+ xcb_input_device_id_t deviceid;
|
||||
+ xcb_timestamp_t time;
|
||||
+ uint32_t detail;
|
||||
+ xcb_window_t root;
|
||||
+ xcb_window_t event;
|
||||
+ xcb_window_t child;
|
||||
+ uint32_t full_sequence;
|
||||
+ xcb_input_fp1616_t root_x;
|
||||
+ xcb_input_fp1616_t root_y;
|
||||
+ xcb_input_fp1616_t event_x;
|
||||
+ xcb_input_fp1616_t event_y;
|
||||
+ xcb_input_fp1616_t delta_x;
|
||||
+ xcb_input_fp1616_t delta_y;
|
||||
+ xcb_input_fp1616_t delta_unaccel_x;
|
||||
+ xcb_input_fp1616_t delta_unaccel_y;
|
||||
+ xcb_input_device_id_t sourceid;
|
||||
+ uint8_t pad0[2];
|
||||
+ xcb_input_modifier_info_t mods;
|
||||
+ xcb_input_group_info_t group;
|
||||
+ uint32_t flags;
|
||||
+} xcb_input_gesture_swipe_begin_event_t;
|
||||
+
|
||||
+/** Opcode for xcb_input_gesture_swipe_update. */
|
||||
+#define XCB_INPUT_GESTURE_SWIPE_UPDATE 31
|
||||
+
|
||||
+typedef xcb_input_gesture_swipe_begin_event_t xcb_input_gesture_swipe_update_event_t;
|
||||
+
|
||||
+/** Opcode for xcb_input_gesture_swipe_end. */
|
||||
+#define XCB_INPUT_GESTURE_SWIPE_END 32
|
||||
+
|
||||
+typedef xcb_input_gesture_swipe_begin_event_t xcb_input_gesture_swipe_end_event_t;
|
||||
+
|
||||
/**
|
||||
* Get the next element of the iterator
|
||||
* @param i Pointer to a xcb_input_event_class_iterator_t
|
||||
@@ -8080,6 +8205,29 @@ xcb_input_touch_class_next (xcb_input_touch_class_iterator_t *i);
|
||||
xcb_generic_iterator_t
|
||||
xcb_input_touch_class_end (xcb_input_touch_class_iterator_t i);
|
||||
|
||||
+/**
|
||||
+ * Get the next element of the iterator
|
||||
+ * @param i Pointer to a xcb_input_gesture_class_iterator_t
|
||||
+ *
|
||||
+ * Get the next element in the iterator. The member rem is
|
||||
+ * decreased by one. The member data points to the next
|
||||
+ * element. The member index is increased by sizeof(xcb_input_gesture_class_t)
|
||||
+ */
|
||||
+void
|
||||
+xcb_input_gesture_class_next (xcb_input_gesture_class_iterator_t *i);
|
||||
+
|
||||
+/**
|
||||
+ * Return the iterator pointing to the last element
|
||||
+ * @param i An xcb_input_gesture_class_iterator_t
|
||||
+ * @return The iterator pointing to the last element
|
||||
+ *
|
||||
+ * Set the current element in the iterator to the last element.
|
||||
+ * The member rem is set to 0. The member data points to the
|
||||
+ * last element.
|
||||
+ */
|
||||
+xcb_generic_iterator_t
|
||||
+xcb_input_gesture_class_end (xcb_input_gesture_class_iterator_t i);
|
||||
+
|
||||
/**
|
||||
* Get the next element of the iterator
|
||||
* @param i Pointer to a xcb_input_valuator_class_iterator_t
|
||||
|
|
@ -20,7 +20,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#define XCB_INPUT_MAJOR_VERSION 2
|
||||
#define XCB_INPUT_MINOR_VERSION 3
|
||||
#define XCB_INPUT_MINOR_VERSION 4
|
||||
|
||||
extern xcb_extension_t xcb_input_id;
|
||||
|
||||
|
|
@ -2671,7 +2671,8 @@ typedef enum xcb_input_device_class_type_t {
|
|||
XCB_INPUT_DEVICE_CLASS_TYPE_BUTTON = 1,
|
||||
XCB_INPUT_DEVICE_CLASS_TYPE_VALUATOR = 2,
|
||||
XCB_INPUT_DEVICE_CLASS_TYPE_SCROLL = 3,
|
||||
XCB_INPUT_DEVICE_CLASS_TYPE_TOUCH = 8
|
||||
XCB_INPUT_DEVICE_CLASS_TYPE_TOUCH = 8,
|
||||
XCB_INPUT_DEVICE_CLASS_TYPE_GESTURE = 9
|
||||
} xcb_input_device_class_type_t;
|
||||
|
||||
typedef enum xcb_input_device_type_t {
|
||||
|
|
@ -2778,6 +2779,26 @@ typedef struct xcb_input_touch_class_iterator_t {
|
|||
int index;
|
||||
} xcb_input_touch_class_iterator_t;
|
||||
|
||||
/**
|
||||
* @brief xcb_input_gesture_class_t
|
||||
**/
|
||||
typedef struct xcb_input_gesture_class_t {
|
||||
uint16_t type;
|
||||
uint16_t len;
|
||||
xcb_input_device_id_t sourceid;
|
||||
uint8_t num_touches;
|
||||
uint8_t pad0;
|
||||
} xcb_input_gesture_class_t;
|
||||
|
||||
/**
|
||||
* @brief xcb_input_gesture_class_iterator_t
|
||||
**/
|
||||
typedef struct xcb_input_gesture_class_iterator_t {
|
||||
xcb_input_gesture_class_t *data;
|
||||
int rem;
|
||||
int index;
|
||||
} xcb_input_gesture_class_iterator_t;
|
||||
|
||||
/**
|
||||
* @brief xcb_input_valuator_class_t
|
||||
**/
|
||||
|
|
@ -2838,6 +2859,10 @@ typedef struct xcb_input_device_class_data_t {
|
|||
uint8_t mode;
|
||||
uint8_t num_touches;
|
||||
} touch;
|
||||
struct {
|
||||
uint8_t num_touches;
|
||||
uint8_t pad2;
|
||||
} gesture;
|
||||
} xcb_input_device_class_data_t;
|
||||
|
||||
/**
|
||||
|
|
@ -3065,7 +3090,9 @@ typedef enum xcb_input_grab_type_t {
|
|||
XCB_INPUT_GRAB_TYPE_KEYCODE = 1,
|
||||
XCB_INPUT_GRAB_TYPE_ENTER = 2,
|
||||
XCB_INPUT_GRAB_TYPE_FOCUS_IN = 3,
|
||||
XCB_INPUT_GRAB_TYPE_TOUCH_BEGIN = 4
|
||||
XCB_INPUT_GRAB_TYPE_TOUCH_BEGIN = 4,
|
||||
XCB_INPUT_GRAB_TYPE_GESTURE_PINCH_BEGIN = 5,
|
||||
XCB_INPUT_GRAB_TYPE_GESTURE_SWIPE_BEGIN = 6
|
||||
} xcb_input_grab_type_t;
|
||||
|
||||
typedef enum xcb_input_modifier_mask_t {
|
||||
|
|
@ -4028,6 +4055,104 @@ typedef struct xcb_input_class_error_t {
|
|||
uint16_t sequence;
|
||||
} xcb_input_class_error_t;
|
||||
|
||||
typedef enum xcb_input_gesture_pinch_event_flags_t {
|
||||
XCB_INPUT_GESTURE_PINCH_EVENT_FLAGS_GESTURE_PINCH_CANCELLED = 1
|
||||
} xcb_input_gesture_pinch_event_flags_t;
|
||||
|
||||
/** Opcode for xcb_input_gesture_pinch_begin. */
|
||||
#define XCB_INPUT_GESTURE_PINCH_BEGIN 27
|
||||
|
||||
/**
|
||||
* @brief xcb_input_gesture_pinch_begin_event_t
|
||||
**/
|
||||
typedef struct xcb_input_gesture_pinch_begin_event_t {
|
||||
uint8_t response_type;
|
||||
uint8_t extension;
|
||||
uint16_t sequence;
|
||||
uint32_t length;
|
||||
uint16_t event_type;
|
||||
xcb_input_device_id_t deviceid;
|
||||
xcb_timestamp_t time;
|
||||
uint32_t detail;
|
||||
xcb_window_t root;
|
||||
xcb_window_t event;
|
||||
xcb_window_t child;
|
||||
uint32_t full_sequence;
|
||||
xcb_input_fp1616_t root_x;
|
||||
xcb_input_fp1616_t root_y;
|
||||
xcb_input_fp1616_t event_x;
|
||||
xcb_input_fp1616_t event_y;
|
||||
xcb_input_fp1616_t delta_x;
|
||||
xcb_input_fp1616_t delta_y;
|
||||
xcb_input_fp1616_t delta_unaccel_x;
|
||||
xcb_input_fp1616_t delta_unaccel_y;
|
||||
xcb_input_fp1616_t scale;
|
||||
xcb_input_fp1616_t delta_angle;
|
||||
xcb_input_device_id_t sourceid;
|
||||
uint8_t pad0[2];
|
||||
xcb_input_modifier_info_t mods;
|
||||
xcb_input_group_info_t group;
|
||||
uint32_t flags;
|
||||
} xcb_input_gesture_pinch_begin_event_t;
|
||||
|
||||
/** Opcode for xcb_input_gesture_pinch_update. */
|
||||
#define XCB_INPUT_GESTURE_PINCH_UPDATE 28
|
||||
|
||||
typedef xcb_input_gesture_pinch_begin_event_t xcb_input_gesture_pinch_update_event_t;
|
||||
|
||||
/** Opcode for xcb_input_gesture_pinch_end. */
|
||||
#define XCB_INPUT_GESTURE_PINCH_END 29
|
||||
|
||||
typedef xcb_input_gesture_pinch_begin_event_t xcb_input_gesture_pinch_end_event_t;
|
||||
|
||||
typedef enum xcb_input_gesture_swipe_event_flags_t {
|
||||
XCB_INPUT_GESTURE_SWIPE_EVENT_FLAGS_GESTURE_SWIPE_CANCELLED = 1
|
||||
} xcb_input_gesture_swipe_event_flags_t;
|
||||
|
||||
/** Opcode for xcb_input_gesture_swipe_begin. */
|
||||
#define XCB_INPUT_GESTURE_SWIPE_BEGIN 30
|
||||
|
||||
/**
|
||||
* @brief xcb_input_gesture_swipe_begin_event_t
|
||||
**/
|
||||
typedef struct xcb_input_gesture_swipe_begin_event_t {
|
||||
uint8_t response_type;
|
||||
uint8_t extension;
|
||||
uint16_t sequence;
|
||||
uint32_t length;
|
||||
uint16_t event_type;
|
||||
xcb_input_device_id_t deviceid;
|
||||
xcb_timestamp_t time;
|
||||
uint32_t detail;
|
||||
xcb_window_t root;
|
||||
xcb_window_t event;
|
||||
xcb_window_t child;
|
||||
uint32_t full_sequence;
|
||||
xcb_input_fp1616_t root_x;
|
||||
xcb_input_fp1616_t root_y;
|
||||
xcb_input_fp1616_t event_x;
|
||||
xcb_input_fp1616_t event_y;
|
||||
xcb_input_fp1616_t delta_x;
|
||||
xcb_input_fp1616_t delta_y;
|
||||
xcb_input_fp1616_t delta_unaccel_x;
|
||||
xcb_input_fp1616_t delta_unaccel_y;
|
||||
xcb_input_device_id_t sourceid;
|
||||
uint8_t pad0[2];
|
||||
xcb_input_modifier_info_t mods;
|
||||
xcb_input_group_info_t group;
|
||||
uint32_t flags;
|
||||
} xcb_input_gesture_swipe_begin_event_t;
|
||||
|
||||
/** Opcode for xcb_input_gesture_swipe_update. */
|
||||
#define XCB_INPUT_GESTURE_SWIPE_UPDATE 31
|
||||
|
||||
typedef xcb_input_gesture_swipe_begin_event_t xcb_input_gesture_swipe_update_event_t;
|
||||
|
||||
/** Opcode for xcb_input_gesture_swipe_end. */
|
||||
#define XCB_INPUT_GESTURE_SWIPE_END 32
|
||||
|
||||
typedef xcb_input_gesture_swipe_begin_event_t xcb_input_gesture_swipe_end_event_t;
|
||||
|
||||
/**
|
||||
* Get the next element of the iterator
|
||||
* @param i Pointer to a xcb_input_event_class_iterator_t
|
||||
|
|
@ -8080,6 +8205,29 @@ xcb_input_touch_class_next (xcb_input_touch_class_iterator_t *i);
|
|||
xcb_generic_iterator_t
|
||||
xcb_input_touch_class_end (xcb_input_touch_class_iterator_t i);
|
||||
|
||||
/**
|
||||
* Get the next element of the iterator
|
||||
* @param i Pointer to a xcb_input_gesture_class_iterator_t
|
||||
*
|
||||
* Get the next element in the iterator. The member rem is
|
||||
* decreased by one. The member data points to the next
|
||||
* element. The member index is increased by sizeof(xcb_input_gesture_class_t)
|
||||
*/
|
||||
void
|
||||
xcb_input_gesture_class_next (xcb_input_gesture_class_iterator_t *i);
|
||||
|
||||
/**
|
||||
* Return the iterator pointing to the last element
|
||||
* @param i An xcb_input_gesture_class_iterator_t
|
||||
* @return The iterator pointing to the last element
|
||||
*
|
||||
* Set the current element in the iterator to the last element.
|
||||
* The member rem is set to 0. The member data points to the
|
||||
* last element.
|
||||
*/
|
||||
xcb_generic_iterator_t
|
||||
xcb_input_gesture_class_end (xcb_input_gesture_class_iterator_t i);
|
||||
|
||||
/**
|
||||
* Get the next element of the iterator
|
||||
* @param i Pointer to a xcb_input_valuator_class_iterator_t
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue