summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPovilas Kanapickas <povilas@radix.lt>2021-02-15 14:21:48 +0200
committerPovilas Kanapickas <povilas@radix.lt>2021-02-15 14:21:48 +0200
commitc0176f62ab0bcb2f05b5010eb017065c0371e610 (patch)
tree83c958846ea9a91febe6a9ac46d402c6c3297812
parent4488c0a1e4617e53ec63920d21ef53c287be3546 (diff)
input: Update test after server fixes for emulated event delivery
-rw-r--r--tests/server/input.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/server/input.cpp b/tests/server/input.cpp
index 51f7fc8..678f734 100644
--- a/tests/server/input.cpp
+++ b/tests/server/input.cpp
@@ -772,6 +772,7 @@ TEST_F(DeviceChangedTest, DeviceChangedEvent)
mask.deviceid = XIAllMasterDevices;
mask.mask_len = XIMaskLen(XI_Motion);
mask.mask = new unsigned char[mask.mask_len]();
+ XISetMask(mask.mask, XI_ButtonPress);
XISetMask(mask.mask, XI_Motion);
XISetMask(mask.mask, XI_DeviceChanged);
XISelectEvents(dpy, DefaultRootWindow(dpy), &mask, 1);
@@ -784,16 +785,18 @@ TEST_F(DeviceChangedTest, DeviceChangedEvent)
TouchDev().TouchEnd(120, 120, 0);
ASSERT_EVENT(XIDeviceChangedEvent, dce1, dpy, GenericEvent, xi2_opcode, XI_DeviceChanged);
- ASSERT_EVENT(XIDeviceEvent, motion, dpy, GenericEvent, xi2_opcode, XI_Motion);
+ ASSERT_EVENT(XIDeviceEvent, motion1, dpy, GenericEvent, xi2_opcode, XI_Motion);
+ ASSERT_EVENT(XIDeviceEvent, press1, dpy, GenericEvent, xi2_opcode, XI_ButtonPress);
ASSERT_EVENT(XIDeviceEvent, motion2, dpy, GenericEvent, xi2_opcode, XI_Motion);
- ASSERT_GT(motion->valuators.mask_len, 0);
- ASSERT_TRUE(XIMaskIsSet(motion->valuators.mask, vscroll_axis));
+ ASSERT_EVENT(XIDeviceEvent, motion3, dpy, GenericEvent, xi2_opcode, XI_Motion);
+ ASSERT_GT(motion1->valuators.mask_len, 0);
+ ASSERT_TRUE(XIMaskIsSet(motion1->valuators.mask, vscroll_axis));
double last_value;
- double *valuators = motion->valuators.values;
+ double *valuators = motion1->valuators.values;
for (int i = 0; i < vscroll_axis; i++) {
- if (XIMaskIsSet(motion->valuators.mask, i))
+ if (XIMaskIsSet(motion1->valuators.mask, i))
valuators++;
}
@@ -803,7 +806,7 @@ TEST_F(DeviceChangedTest, DeviceChangedEvent)
MouseDev().RelMotion(1, 0);
ASSERT_EVENT(XIDeviceChangedEvent, dce2, dpy, GenericEvent, xi2_opcode, XI_DeviceChanged);
- ASSERT_EVENT(XIDeviceEvent, motion3, dpy, GenericEvent, xi2_opcode, XI_Motion);
+ ASSERT_EVENT(XIDeviceEvent, motion4, dpy, GenericEvent, xi2_opcode, XI_Motion);
TouchDev().TouchBegin(100, 100, 0, event_valuators);
TouchDev().TouchUpdate(120, 120, 0);