mirror of
https://github.com/swaywm/sway.git
synced 2024-11-18 05:59:15 +00:00
layout cmd: always operate on parent container, like i3Fixes #3724
This commit is contained in:
parent
468d09b664
commit
da829b11c6
|
@ -111,10 +111,8 @@ struct cmd_results *cmd_layout(int argc, char **argv) {
|
||||||
"Unable to change layout of floating windows");
|
"Unable to change layout of floating windows");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Typically we change the layout of the current container, but if the
|
// Operate on parent container, like i3.
|
||||||
// current container is a view (it usually is) then we'll change the layout
|
if (container) {
|
||||||
// of the parent instead, as it doesn't make sense for views to have layout.
|
|
||||||
if (container && container->view) {
|
|
||||||
container = container->parent;
|
container = container->parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue