commit 9bbf10bdfcec1ed1fecb8c8033211dc8b8b66a66
parent b799a30962ff1221dc4a32e76a22fd9ddb9e7ece
Author: Eric Drechsel <eric@pdxhub.org>
Date: Mon, 18 Feb 2019 23:56:12 -0800
layout cmd: always operate on parent container, like i3Fixes #3724
Diffstat:
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/sway/commands/layout.c b/sway/commands/layout.c
@@ -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;
}