summaryrefslogtreecommitdiffstats
path: root/sway/desktop/render.c
diff options
context:
space:
mode:
authorLibravatar russ morris <russ@infocyte.com>2018-07-10 17:59:00 -0700
committerLibravatar russ morris <russ@infocyte.com>2018-07-10 17:59:00 -0700
commit89c25dd149c00aeb8bdad103878d34427fd016fa (patch)
tree9d6d60011259177973310957e09578977ae21235 /sway/desktop/render.c
parentMerge pull request #2233 from emersion/remove-clipboard (diff)
downloadsway-89c25dd149c00aeb8bdad103878d34427fd016fa.tar.gz
sway-89c25dd149c00aeb8bdad103878d34427fd016fa.tar.zst
sway-89c25dd149c00aeb8bdad103878d34427fd016fa.zip
fix tabbed titlebar widths
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r--sway/desktop/render.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index f554b813..c4646a26 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -599,7 +599,8 @@ static void render_container_tabbed(struct sway_output *output,
599 struct border_colors *current_colors = &config->border_colors.unfocused; 599 struct border_colors *current_colors = &config->border_colors.unfocused;
600 struct sway_container_state *pstate = &con->current; 600 struct sway_container_state *pstate = &con->current;
601 601
602 int tab_width = pstate->swayc_width / pstate->children->length; 602 double width_gap_adjustment = 2 * pstate->current_gaps;
603 int tab_width = (pstate->swayc_width - width_gap_adjustment) / pstate->children->length;
603 604
604 // Render tabs 605 // Render tabs
605 for (int i = 0; i < pstate->children->length; ++i) { 606 for (int i = 0; i < pstate->children->length; ++i) {
@@ -628,7 +629,7 @@ static void render_container_tabbed(struct sway_output *output,
628 629
629 // Make last tab use the remaining width of the parent 630 // Make last tab use the remaining width of the parent
630 if (i == pstate->children->length - 1) { 631 if (i == pstate->children->length - 1) {
631 tab_width = pstate->swayc_width - tab_width * i; 632 tab_width = (pstate->swayc_width - width_gap_adjustment) - tab_width * i;
632 } 633 }
633 634
634 render_titlebar(output, damage, child, x, cstate->swayc_y, tab_width, 635 render_titlebar(output, damage, child, x, cstate->swayc_y, tab_width,