summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2012-12-05 20:04:03 -0500
committerPeter Hutterer <peter.hutterer@who-t.net>2012-12-06 11:34:59 +1000
commit1b8ab8cee86beb118164792771c796737df29e71 (patch)
tree58027a13221818da4e19b4df2ea360f416aae7cb
parenteed84d13e96a519445e6f692ee1b160912300cc9 (diff)
server/barriers: update for new protocol
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--tests/server/barriers-notify.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/server/barriers-notify.cpp b/tests/server/barriers-notify.cpp
index f20d41c..56b2092 100644
--- a/tests/server/barriers-notify.cpp
+++ b/tests/server/barriers-notify.cpp
@@ -130,7 +130,7 @@ TEST_F(BarrierNotify, BarrierReleases)
XORG_TESTCASE("Ensure that releasing barriers works without "
"erroring out and allows pointer movement over "
"the barrier, and that we properly get a "
- "XI_BarrierPointerReleased.\n");
+ "XI_BarrierHit with the correct flags.\n");
::Display *dpy = Display();
Window root = DefaultRootWindow(dpy);
@@ -141,7 +141,6 @@ TEST_F(BarrierNotify, BarrierReleases)
mask.mask_len = XIMaskLen(XI_LASTEVENT);
mask.mask = reinterpret_cast<unsigned char*>(calloc(mask.mask_len, 1));
XISetMask(mask.mask, XI_BarrierHit);
- XISetMask(mask.mask, XI_BarrierPointerReleased);
XISetMask(mask.mask, XI_BarrierLeave);
XISelectEvents(dpy, root, &mask, 1);
free(mask.mask);
@@ -157,6 +156,7 @@ TEST_F(BarrierNotify, BarrierReleases)
XITEvent<XIBarrierEvent> event(dpy, GenericEvent, xi2_opcode, XI_BarrierHit);
ASSERT_EQ(barrier, event.ev->barrier);
ASSERT_EQ(1, event.ev->event_id);
+ ASSERT_FALSE((event.ev->flags & XIBarrierPointerReleased));
}
XIBarrierReleasePointer(dpy, VIRTUAL_CORE_POINTER_ID, barrier, 1);
@@ -164,9 +164,10 @@ TEST_F(BarrierNotify, BarrierReleases)
dev->PlayOne(EV_REL, REL_X, -40, True);
{
- XITEvent<XIBarrierEvent> event(dpy, GenericEvent, xi2_opcode, XI_BarrierPointerReleased);
+ XITEvent<XIBarrierEvent> event(dpy, GenericEvent, xi2_opcode, XI_BarrierLeave);
ASSERT_EQ(barrier, event.ev->barrier);
ASSERT_EQ(1, event.ev->event_id);
+ ASSERT_TRUE((event.ev->flags & XIBarrierPointerReleased));
}
/* Immediately afterwards, we should have a new event
@@ -403,7 +404,6 @@ TEST_F(BarrierNotify, BarrierRandREventsVertical)
mask.mask_len = XIMaskLen(XI_LASTEVENT);
mask.mask = new unsigned char[mask.mask_len]();
XISetMask(mask.mask, XI_BarrierHit);
- XISetMask(mask.mask, XI_BarrierPointerReleased);
XISetMask(mask.mask, XI_BarrierLeave);
XISelectEvents(dpy, root, &mask, 1);
delete[] mask.mask;