aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/view.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 7ae8efaa..21b32649 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -185,7 +185,8 @@ bool view_is_only_visible(struct sway_view *view) {
185static bool gaps_to_edge(struct sway_view *view) { 185static 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;
@@ -223,15 +224,15 @@ void view_autoconfigure(struct sway_view *view) {
223 if (config->hide_edge_borders == E_BOTH 224 if (config->hide_edge_borders == E_BOTH
224 || config->hide_edge_borders == E_VERTICAL 225 || config->hide_edge_borders == E_VERTICAL
225 || (smart && !other_views && no_gaps)) { 226 || (smart && !other_views && no_gaps)) {
226 con->border_left = con->x - con->current_gaps != ws->x; 227 con->border_left = con->x - con->current_gaps.left != ws->x;
227 int right_x = con->x + con->width + con->current_gaps; 228 int right_x = con->x + con->width + con->current_gaps.right;
228 con->border_right = right_x != ws->x + ws->width; 229 con->border_right = right_x != ws->x + ws->width;
229 } 230 }
230 if (config->hide_edge_borders == E_BOTH 231 if (config->hide_edge_borders == E_BOTH
231 || config->hide_edge_borders == E_HORIZONTAL 232 || config->hide_edge_borders == E_HORIZONTAL
232 || (smart && !other_views && no_gaps)) { 233 || (smart && !other_views && no_gaps)) {
233 con->border_top = con->y - con->current_gaps != ws->y; 234 con->border_top = con->y - con->current_gaps.top != ws->y;
234 int bottom_y = con->y + con->height + con->current_gaps; 235 int bottom_y = con->y + con->height + con->current_gaps.bottom;
235 con->border_bottom = bottom_y != ws->y + ws->height; 236 con->border_bottom = bottom_y != ws->y + ws->height;
236 } 237 }
237 238