]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/10-dock.t
Merge branch 'fix-i3bar-man'
[i3/i3] / testcases / t / 10-dock.t
index f38defe019a0f157138b43f91eb56e7a2a1d750b..3f0a5195a70737f4956cf9f3a75f57618864f8bf 100644 (file)
@@ -3,7 +3,6 @@
 
 use i3test;
 use X11::XCB qw(:all);
-use Time::HiRes qw(sleep);
 use List::Util qw(first);
 
 BEGIN {
@@ -11,7 +10,7 @@ BEGIN {
 }
 
 my $x = X11::XCB::Connection->new;
-my $i3 = i3("/tmp/nestedcons");
+my $i3 = i3(get_socket_path());
 
 #####################################################################
 # verify that there is no dock window yet
@@ -62,6 +61,25 @@ is($docknode->{rect}->{y}, 0, 'dock node placed at y=0');
 is($docknode->{rect}->{width}, $primary->rect->width, 'dock node as wide as the screen');
 is($docknode->{rect}->{height}, 30, 'dock node has unchanged height');
 
+#####################################################################
+# check that re-configuring the height works
+#####################################################################
+
+$window->rect(X11::XCB::Rect->new(x => 0, y => 0, width => 50, height => 40));
+
+sleep 0.25;
+
+@docked = get_dock_clients('top');
+is(@docked, 1, 'one dock client found');
+
+# verify the position/size
+$docknode = $docked[0];
+
+is($docknode->{rect}->{x}, 0, 'dock node placed at x=0');
+is($docknode->{rect}->{y}, 0, 'dock node placed at y=0');
+is($docknode->{rect}->{width}, $primary->rect->width, 'dock node as wide as the screen');
+is($docknode->{rect}->{height}, 40, 'dock height changed');
+
 $window->destroy;
 
 sleep 0.25;