summaryrefslogtreecommitdiff
path: root/tests/server
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-12-13 13:55:14 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-12-13 15:13:27 +1000
commit9358dd3d53ace574904434a8e432faf4b56a5d1b (patch)
tree73e2e014dd6148c83eb944224d7f18e63bb11e46 /tests/server
parente36617ae0151c3f18747a618550b9af06df6cd47 (diff)
server/barriers: move selecting for barriers up in the class hierarchy
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tests/server')
-rw-r--r--tests/server/barriers-common.h14
-rw-r--r--tests/server/barriers-notify.cpp12
2 files changed, 14 insertions, 12 deletions
diff --git a/tests/server/barriers-common.h b/tests/server/barriers-common.h
index 1812d06..59b53d1 100644
--- a/tests/server/barriers-common.h
+++ b/tests/server/barriers-common.h
@@ -123,6 +123,20 @@ public:
ASSERT_EQ(XIChangeHierarchy(dpy, &change, 1), Success) << "Couldn't attach device2 to the new master pointer.";
}
+#if HAVE_XI23
+ virtual void SelectBarrierEvents(::Display *dpy, Window win) {
+ XIEventMask mask;
+ mask.deviceid = XIAllMasterDevices;
+ mask.mask_len = XIMaskLen(XI_LASTEVENT);
+ mask.mask = new unsigned char[mask.mask_len]();
+ XISetMask(mask.mask, XI_BarrierHit);
+ XISetMask(mask.mask, XI_BarrierLeave);
+ XISelectEvents(dpy, win, &mask, 1);
+ delete[] mask.mask;
+ XSync(dpy, False);
+ }
+#endif
+
virtual void SetUpConfigAndLog() {
config.AddDefaultScreenWithDriver();
config.AddInputSection("evdev", "--device1--",
diff --git a/tests/server/barriers-notify.cpp b/tests/server/barriers-notify.cpp
index f45f39f..714d112 100644
--- a/tests/server/barriers-notify.cpp
+++ b/tests/server/barriers-notify.cpp
@@ -104,18 +104,6 @@ public:
SetDeviceValues(GetParam());
}
- virtual void SelectBarrierEvents(::Display *dpy, Window win) {
- XIEventMask mask;
- mask.deviceid = XIAllMasterDevices;
- mask.mask_len = XIMaskLen(XI_LASTEVENT);
- mask.mask = new unsigned char[mask.mask_len]();
- XISetMask(mask.mask, XI_BarrierHit);
- XISetMask(mask.mask, XI_BarrierLeave);
- XISelectEvents(dpy, win, &mask, 1);
- delete[] mask.mask;
- XSync(dpy, False);
- }
-
virtual void SetDeviceValues(enum BarrierDeviceTestCombinations combination)
{
const char *source_dev;