testcases: use global $x in wait_for_event, drop $x parameter

This commit is contained in:
Maik Fischer
2011-11-21 23:37:04 +01:00
committed by Michael Stapelberg
parent 30ea33decb
commit db6de84d0b
2 changed files with 7 additions and 9 deletions

View File

@ -10,7 +10,7 @@ subtest 'Window without WM_TAKE_FOCUS', sub {
my $window = open_window($x);
ok(!wait_for_event($x, 1, sub { $_[0]->{response_type} == 161 }), 'did not receive ClientMessage');
ok(!wait_for_event(1, sub { $_[0]->{response_type} == 161 }), 'did not receive ClientMessage');
done_testing;
};
@ -27,7 +27,7 @@ subtest 'Window with WM_TAKE_FOCUS', sub {
$window->map;
ok(wait_for_event($x, 1, sub {
ok(wait_for_event(1, sub {
return 0 unless $_[0]->{response_type} == 161;
my ($data, $time) = unpack("L2", $_[0]->{data});
return ($data == $take_focus->id);