2 # vim:ts=4:sw=4:expandtab
8 use_ok('X11::XCB::Connection') or BAIL_OUT('Cannot load X11::XCB::Connection');
11 my $x = X11::XCB::Connection->new;
15 #####################################################################
16 # Create a floating window and see if resizing works
17 #####################################################################
19 my $window = open_floating_window($x);
21 # See if configurerequests cause window movements (they should not)
22 my ($a, $t) = $window->rect;
23 $window->rect(X11::XCB::Rect->new(x => $a->x, y => $a->y, width => $a->width, height => $a->height));
27 my ($na, $nt) = $window->rect;
28 is_deeply($na, $a, 'Rects are equal after configurerequest');
31 $window->rect(X11::XCB::Rect->new(x => 0, y => 0, width => 100, height => 100));
35 my ($absolute, $top) = $window->rect;
37 # Make sure the width/height are different from what we’re gonna test, so
38 # that the test will work.
39 isnt($absolute->width, 300, 'width != 300');
40 isnt($absolute->height, 500, 'height != 500');
42 $window->rect(X11::XCB::Rect->new(x => 0, y => 0, width => 300, height => 500));
46 ($absolute, $top) = $window->rect;
48 is($absolute->width, 300, 'width = 300');
49 is($absolute->height, 500, 'height = 500');
52 # Test with default border
60 # Test with 1-px-border