diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-08-01 13:52:13 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-08-22 15:56:51 +1000 |
commit | 98fe735ea1d756711019c3d90ed6abd9c06abebf (patch) | |
tree | 8ec8b4d4d49630dc1fdf10e95d01f3877a29aa0e /test/input.c | |
parent | dbbe5735d1451bb32f43bce90f0bcfeff46f9743 (diff) |
dix: add KEYBOARD_OR_FLOAT and POINTER_OR_FLOAT to GetMaster()
GetMaster() currently requires an attached slave device as parameter,
resuling in many calls being IsFloating(dev) ? dev : GetMaster(...);
Add two new parameters so GetMaster can be called unconditionally to get the
right device.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'test/input.c')
-rw-r--r-- | test/input.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/input.c b/test/input.c index 31597f9de..c2b0eb012 100644 --- a/test/input.c +++ b/test/input.c @@ -1292,6 +1292,19 @@ static void dix_get_master(void) assert(GetMaster(&floating, MASTER_POINTER) == NULL); assert(GetMaster(&floating, MASTER_KEYBOARD) == NULL); assert(GetMaster(&floating, MASTER_ATTACHED) == NULL); + + assert(GetMaster(&vcp, POINTER_OR_FLOAT) == &vcp); + assert(GetMaster(&vck, POINTER_OR_FLOAT) == &vcp); + assert(GetMaster(&ptr, POINTER_OR_FLOAT) == &vcp); + assert(GetMaster(&kbd, POINTER_OR_FLOAT) == &vcp); + + assert(GetMaster(&vcp, KEYBOARD_OR_FLOAT) == &vck); + assert(GetMaster(&vck, KEYBOARD_OR_FLOAT) == &vck); + assert(GetMaster(&ptr, KEYBOARD_OR_FLOAT) == &vck); + assert(GetMaster(&kbd, KEYBOARD_OR_FLOAT) == &vck); + + assert(GetMaster(&floating, KEYBOARD_OR_FLOAT) == &floating); + assert(GetMaster(&floating, POINTER_OR_FLOAT) == &floating); } |