From f3462178caf09a8777b8671eb03949b75c8ee07a Mon Sep 17 00:00:00 2001 From: Povilas Kanapickas Date: Sun, 30 May 2021 13:26:36 +0300 Subject: [PATCH] test/xi2: Verify that XI_GestureSwipeEnd is ignored when outside mask --- test/xi2/protocol-xiselectevents.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/xi2/protocol-xiselectevents.c b/test/xi2/protocol-xiselectevents.c index 6753bdfa6..7301c46b9 100644 --- a/test/xi2/protocol-xiselectevents.c +++ b/test/xi2/protocol-xiselectevents.c @@ -233,6 +233,17 @@ request_XISelectEvents_masks(xXISelectEventsReq * req) } /* Test 5: + * Mask len is 1 and XI_GestureSwipeEnd is set outside the mask. + * That bit should be ignored -> Success + */ + bits = (unsigned char *) &mask[1]; + mask->mask_len = 1; + memset(bits, 0, 5); + SetBit(bits, XI_ButtonPress); // does not matter which one + SetBit(bits, XI_GestureSwipeEnd); + request_XISelectEvent(req, Success); + + /* Test 6: * HierarchyChanged bit is BadValue for devices other than * XIAllDevices */ @@ -247,7 +258,7 @@ request_XISelectEvents_masks(xXISelectEventsReq * req) request_XISelectEvent(req, BadValue); } - /* Test 6: + /* Test 7: * All bits set minus hierarchy changed bit -> Success */ bits = (unsigned char *) &mask[1];