Tests: fix floating size, add a test to check floating size when starting in tiling

This commit is contained in:
Michael Stapelberg 2011-09-17 14:12:16 +01:00
parent deab3ac338
commit 7a43af04af
1 changed files with 28 additions and 1 deletions

View File

@ -51,7 +51,7 @@ sleep 0.25;
($absolute, $top) = $window->rect;
cmp_ok($absolute->{width}, '==', 80, "i3 let the width at 80");
cmp_ok($absolute->{height}, '==', 92, "i3 let the height at 90");
cmp_ok($absolute->{height}, '==', 90, "i3 let the height at 90");
# We need to compare the position with decorations due to the way
# we do decoration rendering (on the parent frame) in the tree branch
@ -60,4 +60,31 @@ cmp_ok($top->{y}, '==', 19, 'i3 mapped it to y=18');
$window->unmap;
#####################################################################
# check that a tiling window which is then made floating still has
# at least the size of its initial geometry
#####################################################################
$window = $x->root->create_child(
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 1, 1, 80, 90],
background_color => '#C0C0C0',
#window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_UTILITY'),
);
isa_ok($window, 'X11::XCB::Window');
$window->map;
sleep 0.25;
cmd 'floating enable';
($absolute, $top) = $window->rect;
cmp_ok($absolute->{width}, '==', 80, "i3 let the width at 80");
cmp_ok($absolute->{height}, '==', 90, "i3 let the height at 90");
$window->unmap;
done_testing;