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