aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/tree
diff options
context:
space:
mode:
authorLibravatar Pedro CĂ´rte-Real <pedro@pedrocr.net>2019-07-06 11:57:32 +0100
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-07-15 23:46:27 -0400
commitd0233af3b39475b47be4248846536811ddca2624 (patch)
treeacc61150bd9e6bc1a69c8e7f38a700e8a9e8b2ed /include/sway/tree
parentUse -fmacro-prefix-map to strip build path (diff)
downloadsway-d0233af3b39475b47be4248846536811ddca2624.tar.gz
sway-d0233af3b39475b47be4248846536811ddca2624.tar.zst
sway-d0233af3b39475b47be4248846536811ddca2624.zip
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
Diffstat (limited to 'include/sway/tree')
-rw-r--r--include/sway/tree/container.h12
1 files changed, 0 insertions, 12 deletions
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 {
116 bool border_left; 116 bool border_left;
117 bool border_right; 117 bool border_right;
118 118
119 // The gaps currently applied to the container.
120 struct {
121 int top;
122 int right;
123 int bottom;
124 int left;
125 } current_gaps;
126
127 struct sway_workspace *workspace; // NULL when hidden in the scratchpad 119 struct sway_workspace *workspace; // NULL when hidden in the scratchpad
128 struct sway_container *parent; // NULL if container in root of workspace 120 struct sway_container *parent; // NULL if container in root of workspace
129 list_t *children; // struct sway_container 121 list_t *children; // struct sway_container
@@ -296,10 +288,6 @@ struct sway_output *container_get_effective_output(struct sway_container *con);
296 288
297void container_discover_outputs(struct sway_container *con); 289void container_discover_outputs(struct sway_container *con);
298 290
299void container_remove_gaps(struct sway_container *container);
300
301void container_add_gaps(struct sway_container *container);
302
303enum sway_container_layout container_parent_layout(struct sway_container *con); 291enum sway_container_layout container_parent_layout(struct sway_container *con);
304 292
305enum sway_container_layout container_current_parent_layout( 293enum sway_container_layout container_current_parent_layout(