test/xi2: Update tests for gesture event types
This commit is contained in:
parent
f83f7dbb1c
commit
407a2234b3
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue