2 # vim:ts=4:sw=4:expandtab
4 # Please read the following documents before working on tests:
5 # • http://build.i3wm.org/docs/testsuite.html
8 # • http://build.i3wm.org/docs/lib-i3test.html
9 # (alternatively: perldoc ./testcases/lib/i3test.pm)
11 # • http://build.i3wm.org/docs/ipc.html
14 # • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
15 # (unless you are already familiar with Perl)
17 # Checks if the focus is correctly restored, when creating a floating client
18 # over an unfocused tiling client and destroying the floating one again.
25 my $tiled_left = open_window;
26 my $tiled_right = open_window;
28 # Get input focus before creating the floating window
29 my $focus = $x->input_focus;
31 # Create a floating window which is smaller than the minimum enforced size of i3
32 my $window = open_floating_window;
34 is($x->input_focus, $window->id, 'floating window focused');
38 wait_for_unmap $window;
40 is($x->input_focus, $focus, 'Focus correctly restored');