diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-12-22 10:00:15 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-12-22 10:16:15 +1000 |
commit | f75bdf7fbe757f4603e39139acc3c90538a45e15 (patch) | |
tree | d47c342187eb24819dcf6e3a792ac0cfbae00fa6 /test | |
parent | e395efc25f9fd60377f32c2bf1a9153d70908236 (diff) |
test: fix grab mode value tests for new XIGrabModeTouch
This test checks that last-valid-mode + 1 returns a BadValue. With the
addition of XIGrabModeTouch, that value has changed - sync it up again.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/input.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/test/input.c b/test/input.c index d27b3f0c0..576cd8531 100644 --- a/test/input.c +++ b/test/input.c @@ -161,22 +161,31 @@ static void dix_check_grab_values(void) rc = CheckGrabValues(&client, ¶m); assert(rc == Success); - param.this_device_mode = GrabModeAsync + 1; + param.this_device_mode = XIGrabModeTouch; + rc = CheckGrabValues(&client, ¶m); + assert(rc == Success); + + param.this_device_mode = XIGrabModeTouch + 1; rc = CheckGrabValues(&client, ¶m); assert(rc == BadValue); assert(client.errorValue == param.this_device_mode); - assert(client.errorValue == GrabModeAsync + 1); + assert(client.errorValue == XIGrabModeTouch + 1); param.this_device_mode = GrabModeSync; param.other_devices_mode = GrabModeAsync; rc = CheckGrabValues(&client, ¶m); + + param.this_device_mode = GrabModeSync; + param.other_devices_mode = XIGrabModeTouch; + rc = CheckGrabValues(&client, ¶m); + assert(rc == Success); assert(rc == Success); - param.other_devices_mode = GrabModeAsync + 1; + param.other_devices_mode = XIGrabModeTouch + 1; rc = CheckGrabValues(&client, ¶m); assert(rc == BadValue); assert(client.errorValue == param.other_devices_mode); - assert(client.errorValue == GrabModeAsync + 1); + assert(client.errorValue == XIGrabModeTouch + 1); param.other_devices_mode = GrabModeSync; |