aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-05-31 22:11:12 -0400
committerLibravatar GitHub <noreply@github.com>2018-05-31 22:11:12 -0400
commit4495ec64b2c41ba890d7982d1cf60a3099eb4c97 (patch)
tree7e478c7774d2ce0f3a03b15e4c6c49049ff66b1d
parentMerge pull request #2065 from RedSoxFan/fix-2018 (diff)
parentFix typo (diff)
downloadsway-4495ec64b2c41ba890d7982d1cf60a3099eb4c97.tar.gz
sway-4495ec64b2c41ba890d7982d1cf60a3099eb4c97.tar.zst
sway-4495ec64b2c41ba890d7982d1cf60a3099eb4c97.zip
Merge pull request #2079 from RedSoxFan/fix-2078
Fix moving out of tab/stack when only child
-rw-r--r--sway/tree/layout.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index 9594b75a..b175f567 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -312,6 +312,19 @@ static void workspace_rejigger(struct sway_container *ws,
312static void move_out_of_tabs_stacks(struct sway_container *container, 312static void move_out_of_tabs_stacks(struct sway_container *container,
313 struct sway_container *current, enum movement_direction move_dir, 313 struct sway_container *current, enum movement_direction move_dir,
314 int offs) { 314 int offs) {
315 if (container->parent == current->parent
316 && current->parent->children->length == 1) {
317 wlr_log(L_DEBUG, "Changing layout of %zd", current->parent->id);
318 current->parent->layout = move_dir ==
319 MOVE_LEFT || move_dir == MOVE_RIGHT ? L_HORIZ : L_VERT;
320 if (current->parent->type == C_WORKSPACE) {
321 arrange_workspace(current->parent);
322 } else {
323 arrange_children_of(current->parent);
324 }
325 return;
326 }
327
315 wlr_log(L_DEBUG, "Moving out of tab/stack into a split"); 328 wlr_log(L_DEBUG, "Moving out of tab/stack into a split");
316 bool is_workspace = current->parent->type == C_WORKSPACE; 329 bool is_workspace = current->parent->type == C_WORKSPACE;
317 struct sway_container *old_parent = current->parent->parent; 330 struct sway_container *old_parent = current->parent->parent;