]> git.sur5r.net Git - i3/i3/blob - testcases/t/01-tile.t
Fix unaligned memory access on sparc (Thanks David Coppa)
[i3/i3] / testcases / t / 01-tile.t
1 #!perl
2
3 use Test::More tests => 4;
4 use Test::Deep;
5 use X11::XCB qw(:all);
6 use Data::Dumper;
7 use Time::HiRes qw(sleep);
8
9 BEGIN {
10         use_ok('X11::XCB::Window');
11 }
12
13 my $x = X11::XCB::Connection->new;
14
15 my $original_rect = X11::XCB::Rect->new(x => 0, y => 0, width => 30, height => 30);
16
17 my $window = $x->root->create_child(
18                 class => WINDOW_CLASS_INPUT_OUTPUT,
19                 rect => $original_rect,
20                 background_color => '#C0C0C0',
21 );
22
23 isa_ok($window, 'X11::XCB::Window');
24
25 is_deeply($window->rect, $original_rect, "rect unmodified before mapping");
26
27 $window->map;
28
29 sleep(0.25);
30
31 my $new_rect = $window->rect;
32 ok(!eq_deeply($new_rect, $original_rect), "Window got repositioned");
33
34 diag( "Testing i3, Perl $], $^X" );