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 # Test that focusing floating windows with the command `focus [direction]`
18 # promotes the focused window to the top of the rendering stack.
20 # Bug still in: 4.8-88-gcc09348
23 my $ws = fresh_workspace;
25 my $win1 = open_floating_window;
26 my $win2 = open_floating_window;
27 my $win3 = open_floating_window;
29 # it's a good idea to do this a few times because of the implementation
32 my $ws_con = get_ws($ws);
33 is($ws_con->{floating_nodes}[-1]->{nodes}[0]->{id}, get_focused($ws),
34 "focus left put the focused window on top of the floating windows (try $i)");
39 my $ws_con = get_ws($ws);
40 is($ws_con->{floating_nodes}[-1]->{nodes}[0]->{id}, get_focused($ws),
41 "focus right put the focused window on top of the floating windows (try $i)");