aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/tree/layout.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index bc7ee6bb..2f4ae667 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -327,7 +327,6 @@ static void move_out_of_tabs_stacks(struct sway_container *container,
327 327
328 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");
329 bool is_workspace = current->parent->type == C_WORKSPACE; 329 bool is_workspace = current->parent->type == C_WORKSPACE;
330 struct sway_container *old_parent = current->parent->parent;
331 struct sway_container *new_parent = container_split(current->parent, 330 struct sway_container *new_parent = container_split(current->parent,
332 move_dir == MOVE_LEFT || move_dir == MOVE_RIGHT ? L_HORIZ : L_VERT); 331 move_dir == MOVE_LEFT || move_dir == MOVE_RIGHT ? L_HORIZ : L_VERT);
333 if (is_workspace) { 332 if (is_workspace) {
@@ -337,7 +336,6 @@ static void move_out_of_tabs_stacks(struct sway_container *container,
337 container_reap_empty_recursive(new_parent->parent); 336 container_reap_empty_recursive(new_parent->parent);
338 container_flatten(new_parent->parent); 337 container_flatten(new_parent->parent);
339 } 338 }
340 wl_signal_emit(&container->events.reparent, old_parent);
341 container_create_notify(new_parent); 339 container_create_notify(new_parent);
342 if (is_workspace) { 340 if (is_workspace) {
343 arrange_workspace(new_parent->parent); 341 arrange_workspace(new_parent->parent);
@@ -903,6 +901,7 @@ struct sway_container *container_split(struct sway_container *child,
903 struct sway_container *ws_child = workspace->children->items[0]; 901 struct sway_container *ws_child = workspace->children->items[0];
904 container_remove_child(ws_child); 902 container_remove_child(ws_child);
905 container_add_child(cont, ws_child); 903 container_add_child(cont, ws_child);
904 wl_signal_emit(&ws_child->events.reparent, workspace);
906 } 905 }
907 906
908 container_add_child(workspace, cont); 907 container_add_child(workspace, cont);
@@ -914,9 +913,11 @@ struct sway_container *container_split(struct sway_container *child,
914 seat_set_focus(seat, cont); 913 seat_set_focus(seat, cont);
915 } 914 }
916 } else { 915 } else {
916 struct sway_container *old_parent = child->parent;
917 cont->layout = layout; 917 cont->layout = layout;
918 container_replace_child(child, cont); 918 container_replace_child(child, cont);
919 container_add_child(cont, child); 919 container_add_child(cont, child);
920 wl_signal_emit(&child->events.reparent, old_parent);
920 } 921 }
921 922
922 container_notify_subtree_changed(cont); 923 container_notify_subtree_changed(cont);