layout cmd: always operate on parent container, like i3Fixes #3724

This commit is contained in:
Eric Drechsel 2019-02-18 23:56:12 -08:00 committed by Brian Ashworth
parent b799a30962
commit 9bbf10bdfc

View File

@ -111,10 +111,8 @@ struct cmd_results *cmd_layout(int argc, char **argv) {
"Unable to change layout of floating windows");
}
// Typically we change the layout of the current container, but if the
// current container is a view (it usually is) then we'll change the layout
// of the parent instead, as it doesn't make sense for views to have layout.
if (container && container->view) {
// Operate on parent container, like i3.
if (container) {
container = container->parent;
}