Merge branch 'master' into next

This commit is contained in:
Michael Stapelberg
2012-05-09 21:08:28 +02:00
2 changed files with 31 additions and 10 deletions

View File

@ -2,7 +2,8 @@
# vim:ts=4:sw=4:expandtab
#
# Test if new containers get focused when there is a fullscreen container at
# the time of launching the new one.
# the time of launching the new one. Also make sure that focusing containers
# in other workspaces work even when there is a fullscreen container.
#
use i3test;
@ -85,4 +86,21 @@ is(scalar @$nodes, 2, 'precisely two windows');
is($nodes->[0]->{id}, $old_id, 'id unchanged');
is($nodes->[0]->{focused}, 1, 'fullscreen window focused');
################################################################################
# Make sure it's possible to focus a container in a different workspace even if
# we are currently focusing a fullscreen container.
################################################################################
$tmp2 = fresh_workspace;
my $focusable_window = open_window;
cmd "workspace $tmp";
cmd '[id="' . $focusable_window->id . '"] focus';
is(focused_ws(), $tmp2, 'focus went to a different workspace');
$nodes = get_ws_content($tmp2);
is(scalar @$nodes, 1, 'precisely one window');
is($nodes->[0]->{focused}, 1, 'focusable window focused');
done_testing;