2 # vim:ts=4:sw=4:expandtab
4 # Regression test for inplace restarting with dock clients
10 use_ok('X11::XCB::Window');
13 my $x = X11::XCB::Connection->new;
15 my $tmp = fresh_workspace;
17 #####################################################################
18 # verify that there is no dock window yet
19 #####################################################################
21 # Children of all dockareas
22 my @docked = get_dock_clients;
24 is(@docked, 0, 'no dock clients yet');
28 my $window = open_window($x, {
29 background_color => '#FF0000',
30 window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
33 #####################################################################
34 # check that we can find it in the layout tree at the expected position
35 #####################################################################
37 @docked = get_dock_clients;
38 is(@docked, 1, 'one dock client found');
41 my $docknode = $docked[0];
43 is($docknode->{rect}->{height}, 30, 'dock node has unchanged height');
45 # perform an inplace-restart
53 #####################################################################
54 # check that we can still find the dock client
55 #####################################################################
57 @docked = get_dock_clients;
58 is(@docked, 1, 'one dock client found');
59 $docknode = $docked[0];
61 is($docknode->{rect}->{height}, 30, 'dock node has unchanged height after restart');
67 @docked = get_dock_clients;
68 is(@docked, 0, 'no dock clients found');
70 #####################################################################
71 # create a dock client with a 1px border
72 #####################################################################
74 $window = open_window($x, {
76 rect => [ 0, 0, 30, 20 ],
77 background_color => '#00FF00',
78 window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
81 @docked = get_dock_clients;
82 is(@docked, 1, 'one dock client found');
83 $docknode = $docked[0];
85 is($docknode->{rect}->{height}, 20, 'dock node has unchanged height');
90 @docked = get_dock_clients;
91 is(@docked, 1, 'one dock client found');
92 $docknode = $docked[0];
94 is($docknode->{rect}->{height}, 20, 'dock node has unchanged height');