2 # vim:ts=4:sw=4:expandtab
4 use Test::More tests => 2;
8 use Time::HiRes qw(sleep);
10 use lib "$FindBin::Bin/lib";
12 use List::Util qw(first);
15 #use_ok('IO::Socket::UNIX') or BAIL_OUT('Cannot load IO::Socket::UNIX');
16 use_ok('X11::XCB::Connection') or BAIL_OUT('Cannot load X11::XCB::Connection');
19 my $x = X11::XCB::Connection->new;
21 #####################################################################
22 # Create a dock window and see if it gets managed
23 #####################################################################
25 my $screens = $x->screens;
27 # Get the primary screen
28 my $primary = first { $_->primary } @{$screens};
30 # TODO: focus the primary screen before
32 my $window = $x->root->create_child(
33 class => WINDOW_CLASS_INPUT_OUTPUT,
34 rect => [ 0, 0, 30, 30],
35 background_color => '#FF0000',
36 type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
43 my $rect = $window->rect;
44 is($rect->width, $primary->rect->width, 'dock client is as wide as the screen');
46 diag( "Testing i3, Perl $], $^X" );