summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-10-28 12:06:35 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-10-31 08:28:04 +1000
commit1db393686425591778ed89239ba024844d20ce73 (patch)
tree0e0834f43ccfcf5def2fa58b07a0f16f5a9904ed
parent40ce5943c5bf58c06742851b11b63c8d8e5b16dc (diff)
server/grab: fix up test for new motion event fix
The server had a bad condition, not sending out enough motion events. Fixed with 4292a39c8014f9f4920bed3001802e4a3e523c5e Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--tests/server/grab.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/server/grab.cpp b/tests/server/grab.cpp
index d19b947..1c43a43 100644
--- a/tests/server/grab.cpp
+++ b/tests/server/grab.cpp
@@ -791,6 +791,7 @@ TEST_F(TouchGrabTest, ActivePointerGrabOverPointerSelection)
ASSERT_EVENT(XIDeviceEvent, press, dpy2, GenericEvent, xi2_opcode, XI_ButtonPress);
ASSERT_EVENT(XIDeviceEvent, motion, dpy2, GenericEvent, xi2_opcode, XI_Motion);
+ ASSERT_EVENT(XIDeviceEvent, motion1, dpy2, GenericEvent, xi2_opcode, XI_Motion);
ASSERT_EVENT(XIDeviceEvent, release, dpy2, GenericEvent, xi2_opcode, XI_ButtonRelease);
ASSERT_TRUE(NoEventPending(dpy2));
@@ -801,6 +802,7 @@ TEST_F(TouchGrabTest, ActivePointerGrabOverPointerSelection)
ASSERT_EVENT(XIDeviceEvent, press2, dpy2, GenericEvent, xi2_opcode, XI_ButtonPress);
ASSERT_EVENT(XIDeviceEvent, motion2, dpy2, GenericEvent, xi2_opcode, XI_Motion);
+ ASSERT_EVENT(XIDeviceEvent, motion3, dpy2, GenericEvent, xi2_opcode, XI_Motion);
ASSERT_EVENT(XIDeviceEvent, release2, dpy2, GenericEvent, xi2_opcode, XI_ButtonRelease);
ASSERT_TRUE(NoEventPending(dpy2));
@@ -1189,13 +1191,19 @@ TEST_F(TouchGrabTestOnLegacyClient, ActivePointerGrabOverPointerSelection)
EXPECT_EVENT(XIDeviceEvent, press_dev_1, dpy, GenericEvent, xi2_opcode, XI_ButtonPress);
EXPECT_EQ(press_dev_1->deviceid, deviceid);
+
EXPECT_EVENT(XIDeviceEvent, motion, dpy, GenericEvent, xi2_opcode, XI_Motion);
EXPECT_EQ(motion->deviceid, VIRTUAL_CORE_POINTER_ID);
-
EXPECT_EVENT(XIDeviceEvent, press, dpy, GenericEvent, xi2_opcode, XI_ButtonPress);
EXPECT_EQ(press->deviceid, VIRTUAL_CORE_POINTER_ID);
+
+ EXPECT_EVENT(XIDeviceEvent, motion_dev_1, dpy, GenericEvent, xi2_opcode, XI_Motion);
+ EXPECT_EQ(motion_dev_1->deviceid, deviceid);
EXPECT_EVENT(XIDeviceEvent, release_dev_1, dpy, GenericEvent, xi2_opcode, XI_ButtonRelease);
EXPECT_EQ(release_dev_1->deviceid, deviceid);
+
+ EXPECT_EVENT(XIDeviceEvent, motion2, dpy, GenericEvent, xi2_opcode, XI_Motion);
+ EXPECT_EQ(motion2->deviceid, VIRTUAL_CORE_POINTER_ID);
EXPECT_EVENT(XIDeviceEvent, release, dpy, GenericEvent, xi2_opcode, XI_ButtonRelease);
EXPECT_EQ(release->deviceid, VIRTUAL_CORE_POINTER_ID);