2011-03-04 15:21:18 +01:00
|
|
|
#!perl
|
|
|
|
# vim:ts=4:sw=4:expandtab
|
|
|
|
#
|
2012-09-10 14:09:01 +02:00
|
|
|
# Please read the following documents before working on tests:
|
2017-09-24 10:19:50 +02:00
|
|
|
# • https://build.i3wm.org/docs/testsuite.html
|
2012-09-10 14:09:01 +02:00
|
|
|
# (or docs/testsuite)
|
|
|
|
#
|
2017-09-24 10:19:50 +02:00
|
|
|
# • https://build.i3wm.org/docs/lib-i3test.html
|
2012-09-10 14:09:01 +02:00
|
|
|
# (alternatively: perldoc ./testcases/lib/i3test.pm)
|
|
|
|
#
|
2017-09-24 10:19:50 +02:00
|
|
|
# • https://build.i3wm.org/docs/ipc.html
|
2012-09-10 14:09:01 +02:00
|
|
|
# (or docs/ipc)
|
|
|
|
#
|
|
|
|
# • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
|
|
|
|
# (unless you are already familiar with Perl)
|
|
|
|
#
|
2011-03-04 15:21:18 +01:00
|
|
|
# Regression test for closing one of multiple dock clients
|
|
|
|
#
|
|
|
|
use i3test;
|
|
|
|
|
2011-03-09 20:25:17 +01:00
|
|
|
my $tmp = fresh_workspace;
|
2011-03-04 15:21:18 +01:00
|
|
|
|
|
|
|
#####################################################################
|
|
|
|
# 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
|
|
|
|
#####################################################################
|
|
|
|
|
2011-11-22 00:47:32 +01:00
|
|
|
my $first = open_window({
|
2011-09-24 16:11:37 +02:00
|
|
|
background_color => '#FF0000',
|
|
|
|
window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
|
|
|
|
});
|
2011-03-04 15:21:18 +01:00
|
|
|
|
|
|
|
#####################################################################
|
|
|
|
# Open a second dock client
|
|
|
|
#####################################################################
|
|
|
|
|
2011-11-22 00:47:32 +01:00
|
|
|
my $second = open_window({
|
2011-09-24 16:11:37 +02:00
|
|
|
background_color => '#FF0000',
|
|
|
|
window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
|
|
|
|
});
|
2011-03-04 15:21:18 +01:00
|
|
|
|
|
|
|
#####################################################################
|
|
|
|
# Kill the second dock client
|
|
|
|
#####################################################################
|
|
|
|
cmd "nop destroying dock client";
|
|
|
|
$second->destroy;
|
|
|
|
|
|
|
|
#####################################################################
|
|
|
|
# Now issue a focus command
|
|
|
|
#####################################################################
|
2011-11-10 19:43:03 +01:00
|
|
|
cmd 'focus right';
|
2011-03-04 15:21:18 +01:00
|
|
|
|
|
|
|
does_i3_live;
|
|
|
|
|
|
|
|
done_testing;
|