]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/135-floating-focus.t
testcases: correctly enable lexical pragmata
[i3/i3] / testcases / t / 135-floating-focus.t
index 4c5b562ff12ef21a40ca6df520baaf25bcdffaf6..5e5a68f23c3389e474eb9b7a7f396d1b41e80e7d 100644 (file)
@@ -49,8 +49,7 @@ cmd 'floating enable';
 # now kill the third one (it's floating). focus should stay unchanged
 cmd '[id="' . $third->id . '"] kill';
 
-# TODO: wait for unmapnotify
-sync_with_i3($x);
+wait_for_unmap($x);
 
 is($x->input_focus, $second->id, 'second con still focused after killing third');
 
@@ -62,9 +61,9 @@ is($x->input_focus, $second->id, 'second con still focused after killing third')
 
 $tmp = fresh_workspace;
 
-$first = open_window($x, '#ff0000');    # window 5
-$second = open_window($x, '#00ff00');   # window 6
-my $third = open_window($x, '#0000ff'); # window 7
+$first = open_window($x, { background_color => '#ff0000' });    # window 5
+$second = open_window($x, { background_color => '#00ff00' });   # window 6
+$third = open_window($x, { background_color => '#0000ff' }); # window 7
 
 is($x->input_focus, $third->id, 'last container focused');
 
@@ -81,15 +80,12 @@ cmd 'floating enable';
 # now kill the second one. focus should fall back to the third one, which is
 # also floating
 cmd 'kill';
-
-# TODO: wait for unmapnotify
-sync_with_i3($x);
+wait_for_unmap($x);
 
 is($x->input_focus, $third->id, 'third con focused');
 
 cmd 'kill';
-# TODO: wait for unmapnotify
-sync_with_i3($x);
+wait_for_unmap($x);
 
 is($x->input_focus, $first->id, 'first con focused after killing all floating cons');
 
@@ -122,15 +118,12 @@ sync_with_i3($x);
 # now kill the second one. focus should fall back to the third one, which is
 # also floating
 cmd 'kill';
-
-# TODO: wait for unmapnotify
-sync_with_i3($x);
+wait_for_unmap($x);
 
 is($x->input_focus, $third->id, 'third con focused');
 
 cmd 'kill';
-# TODO: wait for unmapnotify
-sync_with_i3($x);
+wait_for_unmap($x);
 
 is($x->input_focus, $first->id, 'first con focused after killing all floating cons');