diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-11-08 07:06:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-08 07:06:41 -0500 |
commit | e53b4813fe7a57f189c91e45355309567fb67b31 (patch) | |
tree | a3696d7b4e32e7f7c254d06486da9140160f7a04 /sway/tree/view.c | |
parent | Add focus_follows_mouse always. (#3081) (diff) | |
parent | gaps: remove duplicate inner gaps (diff) | |
download | sway-e53b4813fe7a57f189c91e45355309567fb67b31.tar.gz sway-e53b4813fe7a57f189c91e45355309567fb67b31.tar.zst sway-e53b4813fe7a57f189c91e45355309567fb67b31.zip |
Merge pull request #3086 from RedSoxFan/fix-dup-inner-gaps
gaps: remove duplicate inner gaps
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r-- | sway/tree/view.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 1aa59e68..03bb01d3 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -185,7 +185,8 @@ bool view_is_only_visible(struct sway_view *view) { | |||
185 | static bool gaps_to_edge(struct sway_view *view) { | 185 | static bool gaps_to_edge(struct sway_view *view) { |
186 | struct sway_container *con = view->container; | 186 | struct sway_container *con = view->container; |
187 | while (con) { | 187 | while (con) { |
188 | if (con->current_gaps > 0) { | 188 | if (con->current_gaps.top > 0 || con->current_gaps.right > 0 || |
189 | con->current_gaps.bottom > 0 || con->current_gaps.left > 0) { | ||
189 | return true; | 190 | return true; |
190 | } | 191 | } |
191 | con = con->parent; | 192 | con = con->parent; |
@@ -222,15 +223,15 @@ void view_autoconfigure(struct sway_view *view) { | |||
222 | if (config->hide_edge_borders == E_BOTH | 223 | if (config->hide_edge_borders == E_BOTH |
223 | || config->hide_edge_borders == E_VERTICAL | 224 | || config->hide_edge_borders == E_VERTICAL |
224 | || (smart && !other_views && no_gaps)) { | 225 | || (smart && !other_views && no_gaps)) { |
225 | con->border_left = con->x - con->current_gaps != ws->x; | 226 | con->border_left = con->x - con->current_gaps.left != ws->x; |
226 | int right_x = con->x + con->width + con->current_gaps; | 227 | int right_x = con->x + con->width + con->current_gaps.right; |
227 | con->border_right = right_x != ws->x + ws->width; | 228 | con->border_right = right_x != ws->x + ws->width; |
228 | } | 229 | } |
229 | if (config->hide_edge_borders == E_BOTH | 230 | if (config->hide_edge_borders == E_BOTH |
230 | || config->hide_edge_borders == E_HORIZONTAL | 231 | || config->hide_edge_borders == E_HORIZONTAL |
231 | || (smart && !other_views && no_gaps)) { | 232 | || (smart && !other_views && no_gaps)) { |
232 | con->border_top = con->y - con->current_gaps != ws->y; | 233 | con->border_top = con->y - con->current_gaps.top != ws->y; |
233 | int bottom_y = con->y + con->height + con->current_gaps; | 234 | int bottom_y = con->y + con->height + con->current_gaps.bottom; |
234 | con->border_bottom = bottom_y != ws->y + ws->height; | 235 | con->border_bottom = bottom_y != ws->y + ws->height; |
235 | } | 236 | } |
236 | 237 | ||