Bugfix: Obey workspace_layout when re-inserting floating containers (+test) (Thanks aksr)

The code wasn’t using con_attach and therefore didn’t obey workspace_layout.

Fixes: #631
This commit is contained in:
Michael Stapelberg
2012-01-30 16:03:51 +00:00
parent 714c8fcbe7
commit 4f98bbf5ff
2 changed files with 20 additions and 3 deletions

View File

@ -122,6 +122,24 @@ is($content[1]->{layout}, 'stacked', 'layout stacked');
is(@content, 1, 'one con on target workspace');
is($content[0]->{layout}, 'stacked', 'layout stacked');
#####################################################################
# 7: toggle floating mode and check that we have a stacked con when
# re-inserting a floating container.
#####################################################################
$tmp = fresh_workspace;
$first = open_window;
cmd 'floating toggle';
cmd 'floating toggle';
$second = open_window;
is($x->input_focus, $second->id, 'second window focused');
@content = @{get_ws_content($tmp)};
ok(@content == 1, 'one con at workspace level');
is($content[0]->{layout}, 'stacked', 'layout stacked');
exit_gracefully($pid);
done_testing;