]> git.sur5r.net Git - i3/i3/blob - testcases/t/230-floating-fullscreen-restart.t
tests: replace http:// with https:// where appropriate
[i3/i3] / testcases / t / 230-floating-fullscreen-restart.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 #
4 # Please read the following documents before working on tests:
5 # • https://build.i3wm.org/docs/testsuite.html
6 #   (or docs/testsuite)
7 #
8 # • https://build.i3wm.org/docs/lib-i3test.html
9 #   (alternatively: perldoc ./testcases/lib/i3test.pm)
10 #
11 # • https://build.i3wm.org/docs/ipc.html
12 #   (or docs/ipc)
13 #
14 # • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
15 #   (unless you are already familiar with Perl)
16 #
17 # Ensures floating windows don’t drop out of fullscreen mode when restarting
18 # and that they keep their geometry.
19 # Ticket: #1263
20 # Bug still in: 4.7.2-200-g570b572
21 use i3test i3_config => <<EOT;
22 # i3 config file (v4)
23 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
24
25 for_window [instance=__i3-test-window] floating enable, border pixel 1
26 EOT
27
28 my $tmp = fresh_workspace;
29
30 my $window = open_window(wm_class => '__i3-test-window');
31
32 cmd 'fullscreen';
33
34 my ($nodes, $focus) = get_ws($tmp);
35 my $floating_win = $nodes->{floating_nodes}->[0]->{nodes}->[0];
36 is($floating_win->{fullscreen_mode}, 1, 'floating window in fullscreen mode');
37 my $old_geometry = $floating_win->{geometry};
38
39 cmd 'restart';
40
41 ($nodes, $focus) = get_ws($tmp);
42 $floating_win = $nodes->{floating_nodes}->[0]->{nodes}->[0];
43 is($floating_win->{fullscreen_mode}, 1, 'floating window still in fullscreen mode');
44 is_deeply($floating_win->{geometry}, $old_geometry, 'floating window geometry still the same');
45
46 done_testing;