diff options
author | Eric Drechsel <eric@pdxhub.org> | 2019-02-18 23:56:12 -0800 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2019-02-19 10:50:49 -0500 |
commit | 9bbf10bdfcec1ed1fecb8c8033211dc8b8b66a66 (patch) | |
tree | 4f73eef9a69b85452afcc56955b884d1e4f83b5e | |
parent | Don't use SOCK_CLOEXEC (diff) | |
download | sway-9bbf10bdfcec1ed1fecb8c8033211dc8b8b66a66.tar.gz sway-9bbf10bdfcec1ed1fecb8c8033211dc8b8b66a66.tar.zst sway-9bbf10bdfcec1ed1fecb8c8033211dc8b8b66a66.zip |
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 2aca31dc..7d61c3be 100644 --- a/sway/commands/layout.c +++ b/sway/commands/layout.c | |||
@@ -111,10 +111,8 @@ struct cmd_results *cmd_layout(int argc, char **argv) { | |||
111 | "Unable to change layout of floating windows"); | 111 | "Unable to change layout of floating windows"); |
112 | } | 112 | } |
113 | 113 | ||
114 | // Typically we change the layout of the current container, but if the | 114 | // Operate on parent container, like i3. |
115 | // current container is a view (it usually is) then we'll change the layout | 115 | if (container) { |
116 | // of the parent instead, as it doesn't make sense for views to have layout. | ||
117 | if (container && container->view) { | ||
118 | container = container->parent; | 116 | container = container->parent; |
119 | } | 117 | } |
120 | 118 | ||