diff options
author | Nate Symer <[email protected]> | 2018-06-09 09:34:56 -0400 |
---|---|---|
committer | Nate Symer <[email protected]> | 2018-06-09 09:34:56 -0400 |
commit | 6a910b9ba5443aa31f7cc2468c943c2f9da4854b (patch) | |
tree | 24e4ea6634a734ed303c7aaf611df682adbf746c /sway/tree/layout.c | |
parent | 21d98d5bfb19491f8fd486a2eddc8efe9fb3de6c (diff) |
Implement gaps (PR #2047)
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r-- | sway/tree/layout.c | 7 |
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, wlr_log(L_DEBUG, "creating container %p around %p", cont, child); + remove_gaps(child); + cont->prev_layout = L_NONE; cont->width = child->width; cont->height = child->height; @@ -879,6 +881,9 @@ struct sway_container *container_split(struct sway_container *child, struct sway_seat *seat = input_manager_get_default_seat(input_manager); bool set_focus = (seat_get_focus(seat) == child); + + add_gaps(cont); + if (child->type == C_WORKSPACE) { struct sway_container *workspace = child; while (workspace->children->length) { @@ -906,7 +911,7 @@ struct sway_container *container_split(struct sway_container *child, } container_notify_subtree_changed(cont); - + arrange_children_of(cont); return cont; } |