2 # vim:ts=4:sw=4:expandtab
3 # Tests resizing tiling containers
8 use_ok('X11::XCB::Window');
11 my $x = X11::XCB::Connection->new;
13 my $tmp = fresh_workspace;
17 my $top = open_standard_window($x);
19 my $bottom = open_standard_window($x);
22 diag("top = " . $top->id . ", bottom = " . $bottom->id);
24 is($x->input_focus, $bottom->id, 'Bottom window focused');
26 ############################################################
28 ############################################################
30 cmd 'resize grow up 10 px or 25 ppt';
32 my ($nodes, $focus) = get_ws_content($tmp);
34 is($nodes->[0]->{percent}, 0.25, 'top window got only 25%');
35 is($nodes->[1]->{percent}, 0.75, 'bottom window got 75%');
38 ############################################################
39 # split and check if the 'percent' factor is still correct
40 ############################################################
44 ($nodes, $focus) = get_ws_content($tmp);
46 is($nodes->[0]->{percent}, 0.25, 'top window got only 25%');
47 is($nodes->[1]->{percent}, 0.75, 'bottom window got 75%');