diff options
author | Eric Drechsel <eric@pdxhub.org> | 2019-02-18 23:56:12 -0800 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-02-25 17:10:04 -0500 |
commit | da829b11c6bdc05daccaed3b363defbf176fb084 (patch) | |
tree | 59c99edc541de47c6c7d482e61c441f990674322 | |
parent | 468d09b6641272d02ab80760fe0a55e8aab03c2e (diff) | |
download | sway-da829b11c6bdc05daccaed3b363defbf176fb084.zip sway-da829b11c6bdc05daccaed3b363defbf176fb084.tar.gz sway-da829b11c6bdc05daccaed3b363defbf176fb084.tar.bz2 |
layout cmd: always operate on parent container, like i3Fixes #3724
-rw-r--r-- | sway/commands/layout.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sway/commands/layout.c b/sway/commands/layout.c index 2aca31d..7d61c3b 100644 --- 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; } |