]> git.sur5r.net Git - i3/i3/blob - testcases/t/104-focus-stack.t
Merge branch 'fix-comment'
[i3/i3] / testcases / t / 104-focus-stack.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 # Checks if the focus is correctly restored, when creating a floating client
4 # over an unfocused tiling client and destroying the floating one again.
5
6 use i3test;
7
8 my $x = X11::XCB::Connection->new;
9
10 fresh_workspace;
11
12 cmd 'split h';
13 my $tiled_left = open_window($x);
14 my $tiled_right = open_window($x);
15
16 # Get input focus before creating the floating window
17 my $focus = $x->input_focus;
18
19 # Create a floating window which is smaller than the minimum enforced size of i3
20 my $window = open_floating_window($x);
21
22 is($x->input_focus, $window->id, 'floating window focused');
23
24 $window->unmap;
25
26 wait_for_unmap($x);
27
28 is($x->input_focus, $focus, 'Focus correctly restored');
29
30 done_testing;