From a2bd5b44700e1184593494da983c00a2c883ae4a Mon Sep 17 00:00:00 2001 From: Lynne Date: Thu, 2 Oct 2025 15:48:16 +0900 Subject: [PATCH] Revert "sway/commands/layout: flatten parent once" This reverts commit f50e307227c8938a57c098edd77098786ea6613a. The commit broke all mixed layouts, regardless of orientation and rotation. For example: [window][stacked or tabbed windows] This was my main workflow stacking method, by having my editor and a lot of terminals off to the side. --- sway/commands/layout.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/sway/commands/layout.c b/sway/commands/layout.c index a32c908b..12ce4839 100644 --- a/sway/commands/layout.c +++ b/sway/commands/layout.c @@ -134,15 +134,6 @@ 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