2 # vim:ts=4:sw=4:expandtab
4 # by moving the window in the opposite orientation that its parent has, we
5 # force i3 to create a new split container with the appropriate orientation.
6 # However, when doing that two times in a row, we end up with two split
7 # containers which are then redundant (workspace is horizontal, then v-split,
8 # then h-split – we could just append the children of the latest h-split to the
11 # This testcase checks that the tree is properly flattened after moving.
13 use X11::XCB qw(:all);
16 my $x = X11::XCB::Connection->new;
18 my $tmp = fresh_workspace;
20 my $left = open_window($x);
21 my $mid = open_window($x);
22 my $right = open_window($x);
26 my $ws = get_ws($tmp);
28 is($ws->{orientation}, 'horizontal', 'workspace orientation is horizontal');
29 is(@{$ws->{nodes}}, 3, 'all three windows on workspace level');