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 # Verifies that windows are properly recognized as urgent when they start up
18 # with the urgency hint already set (and are assigned to a non-visible
22 # Bug still in: 4.6-62-g7098ef6
23 use i3test i3_autostart => 0;
27 $args{name} //= 'special window';
29 # We use dont_map because i3 will not map the window on the current
30 # workspace. Thus, open_window would time out in wait_for_map (2 seconds).
31 my $window = open_window(
33 wm_class => 'special',
36 $window->add_hint('urgency');
43 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
45 assign [class="special"] nonvisible
47 my $pid = launch_with_config($config);
49 my $tmp = fresh_workspace;
51 ok((scalar grep { $_ eq 'nonvisible' } @{get_workspace_names()}) == 0,
52 'assignment destination workspace does not exist yet');
54 my $window = open_special;
57 ok((scalar grep { $_ eq 'nonvisible' } @{get_workspace_names()}) > 0,
58 'assignment destination workspace exists');
60 my @urgent = grep { $_->{urgent} } @{get_ws_content('nonvisible')};
61 isnt(@urgent, 0, 'urgent window(s) found on destination workspace');
63 exit_gracefully($pid);