mirror of
https://github.com/swaywm/sway.git
synced 2024-09-20 12:41:26 +02:00
Compare commits
9 Commits
f280b1ac77
...
6edb49f7f2
Author | SHA1 | Date | |
---|---|---|---|
|
6edb49f7f2 | ||
|
c32e795053 | ||
|
74d1e2abea | ||
|
91f60f2268 | ||
|
9118a45c5f | ||
|
5507c3b99b | ||
|
94620bb4a3 | ||
|
272d14f8ef | ||
|
fc63ed440a |
@ -134,6 +134,15 @@ struct cmd_results *cmd_layout(int argc, char **argv) {
|
||||
// Operate on parent container, like i3.
|
||||
if (container) {
|
||||
container = container->pending.parent;
|
||||
// If parent has only a singe child operate on its parent and
|
||||
// flatten once, like i3
|
||||
if (container && container->pending.children->length == 1) {
|
||||
struct sway_container *child = container->pending.children->items[0];
|
||||
struct sway_container *parent = container->pending.parent;
|
||||
container_replace(container, child);
|
||||
container_begin_destroy(container);
|
||||
container = parent;
|
||||
}
|
||||
}
|
||||
|
||||
// We could be working with a container OR a workspace. These are different
|
||||
|
Loading…
Reference in New Issue
Block a user