From: Chase Douglas <[email protected]> Clients can't select for the three touch events individually, so ensure the test doesn't try to do so.
Signed-off-by: Chase Douglas <[email protected]> Reviewed-by: Peter Hutterer <[email protected]> Reviewed-by: Daniel Stone <[email protected]> --- test/xi2/protocol-xiselectevents.c | 44 ++++++++++++++++++++++++++++++++++++ 1 files changed, 44 insertions(+), 0 deletions(-) diff --git a/test/xi2/protocol-xiselectevents.c b/test/xi2/protocol-xiselectevents.c index fe1c26d..b6ae1cb 100644 --- a/test/xi2/protocol-xiselectevents.c +++ b/test/xi2/protocol-xiselectevents.c @@ -159,7 +159,18 @@ static void request_XISelectEvents_masks(xXISelectEventsReq *req) memset(bits, 0, mask->mask_len * 4); for (j = 0; j <= XI_LASTEVENT; j++) { + /* Can't select for these events alone */ + if (j == XI_TouchMotion || j == XI_TouchEnd) + continue; + SetBit(bits, j); + + /* Must select for all touch events at once */ + if (j == XI_TouchBegin) { + SetBit(bits, XI_TouchMotion); + SetBit(bits, XI_TouchEnd); + } + request_XISelectEvent(req, Success); ClearBit(bits, j); } @@ -175,7 +186,18 @@ static void request_XISelectEvents_masks(xXISelectEventsReq *req) for (j = 0; j <= XI_LASTEVENT; j++) { + /* Can't select for these events alone */ + if (j == XI_TouchMotion || j == XI_TouchEnd) + continue; + SetBit(bits, j); + + /* Must select for all touch events at once */ + if (j == XI_TouchBegin) { + SetBit(bits, XI_TouchMotion); + SetBit(bits, XI_TouchEnd); + } + request_XISelectEvent(req, Success); } @@ -189,7 +211,18 @@ static void request_XISelectEvents_masks(xXISelectEventsReq *req) for (j = XI_LASTEVENT + 1; j < mask->mask_len * 4; j++) { + /* Can't select for these events alone */ + if (j == XI_TouchMotion || j == XI_TouchEnd) + continue; + SetBit(bits, j); + + /* Must select for all touch events at once */ + if (j == XI_TouchBegin) { + SetBit(bits, XI_TouchMotion); + SetBit(bits, XI_TouchEnd); + } + request_XISelectEvent(req, BadValue); ClearBit(bits, j); } @@ -202,7 +235,18 @@ static void request_XISelectEvents_masks(xXISelectEventsReq *req) memset(bits, 0, mask->mask_len * 4); for (j = 0; j <= XI_LASTEVENT; j++) { + /* Can't select for these events alone */ + if (j == XI_TouchMotion || j == XI_TouchEnd) + continue; + SetBit(bits, j); + + /* Must select for all touch events at once */ + if (j == XI_TouchBegin) { + SetBit(bits, XI_TouchMotion); + SetBit(bits, XI_TouchEnd); + } + request_XISelectEvent(req, Success); } -- 1.7.2.3 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
