summaryrefslogtreecommitdiffstats
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 f56fbffa..d1ad044d 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -872,6 +872,8 @@ struct sway_container *container_split(struct sway_container *child,
872 872
873 wlr_log(L_DEBUG, "creating container %p around %p", cont, child); 873 wlr_log(L_DEBUG, "creating container %p around %p", cont, child);
874 874
875 remove_gaps(child);
876
875 cont->prev_layout = L_NONE; 877 cont->prev_layout = L_NONE;
876 cont->width = child->width; 878 cont->width = child->width;
877 cont->height = child->height; 879 cont->height = child->height;
@@ -880,6 +882,9 @@ struct sway_container *container_split(struct sway_container *child,
880 882
881 struct sway_seat *seat = input_manager_get_default_seat(input_manager); 883 struct sway_seat *seat = input_manager_get_default_seat(input_manager);
882 bool set_focus = (seat_get_focus(seat) == child); 884 bool set_focus = (seat_get_focus(seat) == child);
885
886 add_gaps(cont);
887
883 if (child->type == C_WORKSPACE) { 888 if (child->type == C_WORKSPACE) {
884 struct sway_container *workspace = child; 889 struct sway_container *workspace = child;
885 while (workspace->children->length) { 890 while (workspace->children->length) {
@@ -907,7 +912,7 @@ struct sway_container *container_split(struct sway_container *child,
907 } 912 }
908 913
909 container_notify_subtree_changed(cont); 914 container_notify_subtree_changed(cont);
910 915 arrange_children_of(cont);
911 return cont; 916 return cont;
912} 917}
913 918