2 # vim:ts=4:sw=4:expandtab
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.
10 use List::Util qw(sum);
12 my $tmp = fresh_workspace;
14 cmd 'exec /usr/bin/urxvt';
16 cmd 'exec /usr/bin/urxvt';
19 my ($nodes, $focus) = get_ws_content($tmp);
20 my $old_sum = sum map { $_->{rect}->{width} } @{$nodes};
22 cmd 'resize grow left 10 px or 25 ppt';
25 cmd 'exec /usr/bin/urxvt';
34 ($nodes, $focus) = get_ws_content($tmp);
35 my $new_sum = sum map { $_->{rect}->{width} } @{$nodes};
37 is($old_sum, $new_sum, 'combined container width is still equal');