aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r--sway/tree/layout.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index 6d4cd088..a8aba618 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -871,6 +871,8 @@ struct sway_container *container_split(struct sway_container *child,
871 871
872 wlr_log(L_DEBUG, "creating container %p around %p", cont, child); 872 wlr_log(L_DEBUG, "creating container %p around %p", cont, child);
873 873
874 remove_gaps(child);
875
874 cont->prev_layout = L_NONE; 876 cont->prev_layout = L_NONE;
875 cont->width = child->width; 877 cont->width = child->width;
876 cont->height = child->height; 878 cont->height = child->height;
@@ -879,6 +881,9 @@ struct sway_container *container_split(struct sway_container *child,
879 881
880 struct sway_seat *seat = input_manager_get_default_seat(input_manager); 882 struct sway_seat *seat = input_manager_get_default_seat(input_manager);
881 bool set_focus = (seat_get_focus(seat) == child); 883 bool set_focus = (seat_get_focus(seat) == child);
884
885 add_gaps(cont);
886
882 if (child->type == C_WORKSPACE) { 887 if (child->type == C_WORKSPACE) {
883 struct sway_container *workspace = child; 888 struct sway_container *workspace = child;
884 while (workspace->children->length) { 889 while (workspace->children->length) {
@@ -906,7 +911,7 @@ struct sway_container *container_split(struct sway_container *child,
906 } 911 }
907 912
908 container_notify_subtree_changed(cont); 913 container_notify_subtree_changed(cont);
909 914 arrange_children_of(cont);
910 return cont; 915 return cont;
911} 916}
912 917