diff options
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r-- | sway/desktop/render.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c index b5a10370..5556e5b3 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c | |||
@@ -619,9 +619,7 @@ static void render_container_tabbed(struct sway_output *output, | |||
619 | struct sway_container *current = pstate->focused_inactive_child; | 619 | struct sway_container *current = pstate->focused_inactive_child; |
620 | struct border_colors *current_colors = &config->border_colors.unfocused; | 620 | struct border_colors *current_colors = &config->border_colors.unfocused; |
621 | 621 | ||
622 | double width_gap_adjustment = 2 * pstate->current_gaps; | 622 | int tab_width = (pstate->swayc_width) / pstate->children->length; |
623 | int tab_width = | ||
624 | (pstate->swayc_width - width_gap_adjustment) / pstate->children->length; | ||
625 | 623 | ||
626 | // Render tabs | 624 | // Render tabs |
627 | for (int i = 0; i < pstate->children->length; ++i) { | 625 | for (int i = 0; i < pstate->children->length; ++i) { |
@@ -656,11 +654,10 @@ static void render_container_tabbed(struct sway_output *output, | |||
656 | 654 | ||
657 | // Make last tab use the remaining width of the parent | 655 | // Make last tab use the remaining width of the parent |
658 | if (i == pstate->children->length - 1) { | 656 | if (i == pstate->children->length - 1) { |
659 | tab_width = | 657 | tab_width = pstate->swayc_width - tab_width * i; |
660 | pstate->swayc_width - width_gap_adjustment - tab_width * i; | ||
661 | } | 658 | } |
662 | 659 | ||
663 | render_titlebar(output, damage, child, x, cstate->swayc_y, tab_width, | 660 | render_titlebar(output, damage, child, x, pstate->swayc_y, tab_width, |
664 | colors, title_texture, marks_texture); | 661 | colors, title_texture, marks_texture); |
665 | 662 | ||
666 | if (child == current) { | 663 | if (child == current) { |
@@ -721,9 +718,9 @@ static void render_container_stacked(struct sway_output *output, | |||
721 | marks_texture = view ? view->marks_unfocused : NULL; | 718 | marks_texture = view ? view->marks_unfocused : NULL; |
722 | } | 719 | } |
723 | 720 | ||
724 | int y = cstate->swayc_y + titlebar_height * i; | 721 | int y = pstate->swayc_y + titlebar_height * i; |
725 | render_titlebar(output, damage, child, cstate->swayc_x, y, | 722 | render_titlebar(output, damage, child, pstate->swayc_x, y, |
726 | cstate->swayc_width, colors, title_texture, marks_texture); | 723 | pstate->swayc_width, colors, title_texture, marks_texture); |
727 | 724 | ||
728 | if (child == current) { | 725 | if (child == current) { |
729 | current_colors = colors; | 726 | current_colors = colors; |