]> git.sur5r.net Git - i3/i3/blob - testcases/t/144-regress-floating-resize.t
Merge branch 'displayversion'
[i3/i3] / testcases / t / 144-regress-floating-resize.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 #
4 # Regression: when resizing two containers on a workspace, opening a floating
5 # client, then closing it again, i3 will re-distribute the space on the
6 # workspace as if a tiling container was closed, leading to the containers
7 # taking much more space than they possibly could.
8 #
9 use i3test;
10 use List::Util qw(sum);
11
12 my $tmp = fresh_workspace;
13
14 cmd 'exec /usr/bin/urxvt';
15 sleep 0.5;
16 cmd 'exec /usr/bin/urxvt';
17 sleep 0.5;
18 my ($nodes, $focus) = get_ws_content($tmp);
19 my $old_sum = sum map { $_->{rect}->{width} } @{$nodes};
20 #cmd 'open';
21 cmd 'resize grow left 10 px or 25 ppt';
22 cmd 'split v';
23 #cmd 'open';
24 cmd 'exec /usr/bin/urxvt';
25 sleep 0.5;
26 cmd 'mode toggle';
27 sleep 0.5;
28 cmd 'kill';
29
30 sleep 0.5;
31
32 ($nodes, $focus) = get_ws_content($tmp);
33 my $new_sum = sum map { $_->{rect}->{width} } @{$nodes};
34
35 is($old_sum, $new_sum, 'combined container width is still equal');
36
37 done_testing;