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 # Regression test: Changing border style should not have an impact on the size
18 # (geometry) of the child window. See ticket http://bugs.i3wm.org/561
19 # Wrong behaviour manifested itself up to (including) commit
20 # d805d1bbeaf89e11f67c981f94c9f55bbb4b89d9
24 my $tmp = fresh_workspace;
26 my $win = open_floating_window(rect => [10, 10, 200, 100]);
28 my $geometry = $win->rect;
29 is($geometry->{width}, 200, 'width correct');
30 is($geometry->{height}, 100, 'height correct');
34 $geometry = $win->rect;
35 is($geometry->{width}, 200, 'width correct');
36 is($geometry->{height}, 100, 'height correct');
38 ################################################################################
39 # When in fullscreen mode, the original position must not be overwritten.
40 ################################################################################
42 sub get_floating_con_rect {
43 my ($nodes, $focus) = get_ws($tmp);
44 my $floating_con = $nodes->{floating_nodes}->[0];
45 return $floating_con->{rect};
47 my $old_rect = get_floating_con_rect();
51 is_deeply(get_floating_con_rect(), $old_rect, 'Rect the same after going into fullscreen');
55 is_deeply(get_floating_con_rect(), $old_rect, 'Rect the same after changing border style');