diff options
Diffstat (limited to 'sway/layout.c')
-rw-r--r-- | sway/layout.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sway/layout.c b/sway/layout.c index faa108a1..80c74c16 100644 --- a/sway/layout.c +++ b/sway/layout.c | |||
@@ -571,29 +571,22 @@ void update_geometry(swayc_t *container) { | |||
571 | 571 | ||
572 | // handle hide_edge_borders | 572 | // handle hide_edge_borders |
573 | if (config->hide_edge_borders != E_NONE && (gap <= 0 || (config->smart_gaps && ws->children->length == 1))) { | 573 | if (config->hide_edge_borders != E_NONE && (gap <= 0 || (config->smart_gaps && ws->children->length == 1))) { |
574 | swayc_t *output = swayc_parent_by_type(container, C_OUTPUT); | ||
575 | const struct wlc_size *size = wlc_output_get_resolution(output->handle); | ||
576 | |||
577 | if (config->hide_edge_borders == E_HORIZONTAL || config->hide_edge_borders == E_BOTH) { | 574 | if (config->hide_edge_borders == E_HORIZONTAL || config->hide_edge_borders == E_BOTH) { |
578 | if (geometry.origin.x == 0 || geometry.origin.x == container->x) { | 575 | if (geometry.origin.x == ws->x) { |
579 | // should work for swaybar at left | ||
580 | border_left = 0; | 576 | border_left = 0; |
581 | } | 577 | } |
582 | 578 | ||
583 | if (geometry.origin.x + geometry.size.w == size->w || geometry.size.w == container->width) { | 579 | if (geometry.origin.x + geometry.size.w == ws->width) { |
584 | // should work for swaybar at right | ||
585 | border_right = 0; | 580 | border_right = 0; |
586 | } | 581 | } |
587 | } | 582 | } |
588 | 583 | ||
589 | if (config->hide_edge_borders == E_VERTICAL || config->hide_edge_borders == E_BOTH) { | 584 | if (config->hide_edge_borders == E_VERTICAL || config->hide_edge_borders == E_BOTH) { |
590 | if (geometry.origin.y == 0 || geometry.origin.y == container->y) { | 585 | if (geometry.origin.y == ws->y) { |
591 | // this works for swaybar at top | ||
592 | border_top = 0; | 586 | border_top = 0; |
593 | } | 587 | } |
594 | 588 | ||
595 | if (geometry.origin.y + geometry.size.h == size->h || geometry.size.h == container->height) { | 589 | if (geometry.origin.y + geometry.size.h == ws->height) { |
596 | // this works for swaybar at bottom | ||
597 | border_bottom = 0; | 590 | border_bottom = 0; |
598 | } | 591 | } |
599 | } | 592 | } |