From d0233af3b39475b47be4248846536811ddca2624 Mon Sep 17 00:00:00 2001 From: Pedro CĂ´rte-Real Date: Sat, 6 Jul 2019 11:57:32 +0100 Subject: Rework gaps code to be simpler and correct Instead of tracking gaps per child apply gaps in two logical places: 1. In tiled containers use the layout code to add the gaps between windows. This is much simpler and guarantees that the sizing of children is correct. 2. In the workspace itself apply all the gaps around the edge. Here we're in the correct position to size inner and outer gaps correctly and decide on smart gaps in a single location. Fixes #4296 --- include/sway/tree/container.h | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'include/sway/tree/container.h') diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index 4efde640..099a8089 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h @@ -116,14 +116,6 @@ struct sway_container { bool border_left; bool border_right; - // The gaps currently applied to the container. - struct { - int top; - int right; - int bottom; - int left; - } current_gaps; - struct sway_workspace *workspace; // NULL when hidden in the scratchpad struct sway_container *parent; // NULL if container in root of workspace list_t *children; // struct sway_container @@ -296,10 +288,6 @@ struct sway_output *container_get_effective_output(struct sway_container *con); void container_discover_outputs(struct sway_container *con); -void container_remove_gaps(struct sway_container *container); - -void container_add_gaps(struct sway_container *container); - enum sway_container_layout container_parent_layout(struct sway_container *con); enum sway_container_layout container_current_parent_layout( -- cgit v1.2.3-54-g00ecf