Close empty workspaces if they're not visible.
Previously, we'd only close an empty workspace when we moved away from it. Now we also close it when the last client exits, as long as that workspace is not visible anymore.
This commit is contained in:
committed by
Michael Stapelberg
parent
f4469eee0b
commit
d490bae8a2
22
testcases/t/178-regress-workspace-open.t
Normal file
22
testcases/t/178-regress-workspace-open.t
Normal file
@ -0,0 +1,22 @@
|
||||
#!perl
|
||||
# vim:ts=4:sw=4:expandtab
|
||||
#
|
||||
# Tests if empty workspaces are closed when the last child
|
||||
# exits, as long as they're not empty.
|
||||
#
|
||||
use i3test;
|
||||
|
||||
my $i3 = i3(get_socket_path());
|
||||
|
||||
# Get a workspace and open a container
|
||||
my $ws = fresh_workspace;
|
||||
my $con = open_empty_con($i3);
|
||||
|
||||
# Go to a second workspace, kill the container
|
||||
fresh_workspace;
|
||||
cmd "[con_id=\"$con\"] kill";
|
||||
|
||||
# The first workspace should have been closed
|
||||
ok(!workspace_exists($ws), 'workspace closed');
|
||||
|
||||
done_testing;
|
Reference in New Issue
Block a user