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 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_autostart => 0;
26 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
28 for_window [class="^special_kill$"] kill
29 for_window [class="^special_scratchpad$"] move scratchpad
32 my $pid = launch_with_config($config);
34 my $win = open_window;
36 my $scratch_window = open_window(
37 wm_class => 'special_scratchpad',
43 is($x->input_focus, $win->{id},
44 'an assignment that sends a window to the scratchpad should not disturb focus');
46 my $kill_window = open_window(
47 wm_class => 'special_kill',
53 is($x->input_focus, $win->{id},
54 'an assignment that kills a window should not disturb focus');
56 exit_gracefully($pid);