]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/154-regress-multiple-dock.t
tests: rename files (00x-*.t is basic stuff, >=100-*.t are tests using IPC)
[i3/i3] / testcases / t / 154-regress-multiple-dock.t
diff --git a/testcases/t/154-regress-multiple-dock.t b/testcases/t/154-regress-multiple-dock.t
new file mode 100644 (file)
index 0000000..21cb969
--- /dev/null
@@ -0,0 +1,57 @@
+#!perl
+# vim:ts=4:sw=4:expandtab
+#
+# Regression test for closing one of multiple dock clients
+#
+use X11::XCB qw(:all);
+use i3test;
+
+BEGIN {
+    use_ok('X11::XCB::Window');
+}
+
+my $x = X11::XCB::Connection->new;
+
+my $tmp = fresh_workspace;
+
+#####################################################################
+# verify that there is no dock window yet
+#####################################################################
+
+# Children of all dockareas
+my @docked = get_dock_clients;
+
+is(@docked, 0, 'no dock clients yet');
+
+#####################################################################
+# open a dock client
+#####################################################################
+
+my $first = open_window($x, {
+        background_color => '#FF0000',
+        window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
+    });
+
+#####################################################################
+# Open a second dock client
+#####################################################################
+
+my $second = open_window($x, {
+        background_color => '#FF0000',
+        window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
+    });
+
+#####################################################################
+# Kill the second dock client
+#####################################################################
+cmd "nop destroying dock client";
+$second->destroy;
+
+#####################################################################
+# Now issue a focus command
+#####################################################################
+cmd 'next v';
+
+does_i3_live;
+
+done_testing;