From 8bed4be1f387f9aa48910db1cf979cd847a9a2e3 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sun, 19 Aug 2018 17:00:51 +1000 Subject: Make separate gaps functions per container type In preparation for using type safety. --- sway/tree/layout.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sway/tree/layout.c') diff --git a/sway/tree/layout.c b/sway/tree/layout.c index 601d0e91..85fe7643 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c @@ -218,7 +218,8 @@ struct sway_container *container_split(struct sway_container *child, wlr_log(WLR_DEBUG, "creating container %p around %p", cont, child); - remove_gaps(child); + child->type == C_WORKSPACE ? workspace_remove_gaps(child) + : container_remove_gaps(child); cont->prev_split_layout = L_NONE; cont->width = child->width; @@ -229,7 +230,7 @@ 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); + container_add_gaps(cont); if (child->type == C_WORKSPACE) { struct sway_container *workspace = child; -- cgit v1.2.3-54-g00ecf