summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPovilas Kanapickas <povilas@radix.lt>2021-05-30 13:26:35 +0300
committerPovilas Kanapickas <povilas@radix.lt>2021-05-30 13:26:35 +0300
commit407a2234b32d9cb3fed2cc7e8069bb41b98e143f (patch)
treed05d737acc237632f6d2477bb770749b34ad5c61 /test
parentf83f7dbb1c1be406b82da9bca12be3c43d6bfeee (diff)
test/xi2: Update tests for gesture event types
Diffstat (limited to 'test')
-rw-r--r--test/xi2/protocol-xipassivegrabdevice.c2
-rw-r--r--test/xi2/protocol-xiselectevents.c20
2 files changed, 21 insertions, 1 deletions
diff --git a/test/xi2/protocol-xipassivegrabdevice.c b/test/xi2/protocol-xipassivegrabdevice.c
index 142bcecb7..dc4602d5d 100644
--- a/test/xi2/protocol-xipassivegrabdevice.c
+++ b/test/xi2/protocol-xipassivegrabdevice.c
@@ -194,7 +194,7 @@ test_XIPassiveGrabDevice(void)
request->deviceid = XIAllMasterDevices;
printf("Testing invalid grab types\n");
- for (i = XIGrabtypeTouchBegin + 1; i < 0xFF; i++) {
+ for (i = XIGrabtypeGestureSwipeBegin + 1; i < 0xFF; i++) {
request->grab_type = i;
request_XIPassiveGrabDevice(&client_request, request, BadValue,
request->grab_type);
diff --git a/test/xi2/protocol-xiselectevents.c b/test/xi2/protocol-xiselectevents.c
index 6c94ea73c..6753bdfa6 100644
--- a/test/xi2/protocol-xiselectevents.c
+++ b/test/xi2/protocol-xiselectevents.c
@@ -124,6 +124,16 @@ _set_bit(unsigned char *bits, int bit)
SetBit(bits, XI_TouchUpdate);
SetBit(bits, XI_TouchEnd);
}
+ if (bit >= XI_GesturePinchBegin && bit <= XI_GesturePinchEnd) {
+ SetBit(bits, XI_GesturePinchBegin);
+ SetBit(bits, XI_GesturePinchUpdate);
+ SetBit(bits, XI_GesturePinchEnd);
+ }
+ if (bit >= XI_GestureSwipeBegin && bit <= XI_GestureSwipeEnd) {
+ SetBit(bits, XI_GestureSwipeBegin);
+ SetBit(bits, XI_GestureSwipeUpdate);
+ SetBit(bits, XI_GestureSwipeEnd);
+ }
}
static void
@@ -135,6 +145,16 @@ _clear_bit(unsigned char *bits, int bit)
ClearBit(bits, XI_TouchUpdate);
ClearBit(bits, XI_TouchEnd);
}
+ if (bit >= XI_GesturePinchBegin && bit <= XI_GesturePinchEnd) {
+ ClearBit(bits, XI_GesturePinchBegin);
+ ClearBit(bits, XI_GesturePinchUpdate);
+ ClearBit(bits, XI_GesturePinchEnd);
+ }
+ if (bit >= XI_GestureSwipeBegin && bit <= XI_GestureSwipeEnd) {
+ ClearBit(bits, XI_GestureSwipeBegin);
+ ClearBit(bits, XI_GestureSwipeUpdate);
+ ClearBit(bits, XI_GestureSwipeEnd);
+ }
}
static void