2 # vim:ts=4:sw=4:expandtab
4 # Please read the following documents before working on tests:
5 # • https://build.i3wm.org/docs/testsuite.html
8 # • https://build.i3wm.org/docs/lib-i3test.html
9 # (alternatively: perldoc ./testcases/lib/i3test.pm)
11 # • https://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 an assignment that unmaps a window does not disturb input focus.
18 # This can cause i3 focus to be an unmapped window and different than X focus
19 # which can lead to complications
21 # Bug still in: 4.8-24-g60070de
22 use i3test i3_config => <<'EOT';
24 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
26 for_window [class="^special_kill$"] kill
27 for_window [class="^special_scratchpad$"] move scratchpad
30 my $win = open_window;
32 my $scratch_window = open_window(
33 wm_class => 'special_scratchpad',
39 is($x->input_focus, $win->{id},
40 'an assignment that sends a window to the scratchpad should not disturb focus');
42 my $kill_window = open_window(
43 wm_class => 'special_kill',
49 is($x->input_focus, $win->{id},
50 'an assignment that kills a window should not disturb focus');