tests: use wait_for_{map,unmap} to eliminate more sleep()s

This commit is contained in:
Michael Stapelberg
2011-09-24 13:08:02 +01:00
parent 4821b13cae
commit 4da5b7e784
15 changed files with 139 additions and 84 deletions

View File

@ -4,8 +4,6 @@
# Tests if WM_STATE is WM_STATE_NORMAL when mapped and WM_STATE_WITHDRAWN when
# unmapped.
#
use X11::XCB qw(:all);
use X11::XCB::Connection;
use i3test;
my $x = X11::XCB::Connection->new;
@ -18,6 +16,8 @@ sub two_windows {
my $first = open_standard_window($x);
my $second = open_standard_window($x);
sync_with_i3 $x;
is($x->input_focus, $second->id, 'second window focused');
ok(@{get_ws_content($tmp)} == 2, 'two containers opened');