2 # vim:ts=4:sw=4:expandtab
4 # Regression test for inplace restarting with dock clients
8 my $tmp = fresh_workspace;
10 #####################################################################
11 # verify that there is no dock window yet
12 #####################################################################
14 # Children of all dockareas
15 my @docked = get_dock_clients;
17 is(@docked, 0, 'no dock clients yet');
21 my $window = open_window({
22 background_color => '#FF0000',
23 window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
26 #####################################################################
27 # check that we can find it in the layout tree at the expected position
28 #####################################################################
30 @docked = get_dock_clients;
31 is(@docked, 1, 'one dock client found');
34 my $docknode = $docked[0];
36 is($docknode->{rect}->{height}, 30, 'dock node has unchanged height');
38 # perform an inplace-restart
46 #####################################################################
47 # check that we can still find the dock client
48 #####################################################################
50 @docked = get_dock_clients;
51 is(@docked, 1, 'one dock client found');
52 $docknode = $docked[0];
54 is($docknode->{rect}->{height}, 30, 'dock node has unchanged height after restart');
58 wait_for_unmap $window;
60 @docked = get_dock_clients;
61 is(@docked, 0, 'no dock clients found');
63 #####################################################################
64 # create a dock client with a 1px border
65 #####################################################################
67 $window = open_window({
69 rect => [ 0, 0, 30, 20 ],
70 background_color => '#00FF00',
71 window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
74 @docked = get_dock_clients;
75 is(@docked, 1, 'one dock client found');
76 $docknode = $docked[0];
78 is($docknode->{rect}->{height}, 20, 'dock node has unchanged height');
83 @docked = get_dock_clients;
84 is(@docked, 1, 'one dock client found');
85 $docknode = $docked[0];
87 is($docknode->{rect}->{height}, 20, 'dock node has unchanged height');