diff options
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 6d5777f3..c052cafb 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -709,37 +709,39 @@ static void render_tab_content(struct sway_output *output, | |||
709 | float output_scale = output->wlr_output->scale; | 709 | float output_scale = output->wlr_output->scale; |
710 | float color[4]; | 710 | float color[4]; |
711 | 711 | ||
712 | if (view->border_left) { | 712 | if (view->border != B_NONE) { |
713 | memcpy(&color, colors->child_border, sizeof(float) * 4); | 713 | if (view->border_left) { |
714 | color[3] *= con->alpha; | 714 | memcpy(&color, colors->child_border, sizeof(float) * 4); |
715 | box.x = con->x; | 715 | color[3] *= con->alpha; |
716 | box.y = con->y + config->border_thickness * 2 + config->font_height; | 716 | box.x = con->x; |
717 | box.width = view->border_thickness; | 717 | box.y = con->y + config->border_thickness * 2 + config->font_height; |
718 | box.height = view->height; | 718 | box.width = view->border_thickness; |
719 | scale_box(&box, output_scale); | 719 | box.height = view->height; |
720 | render_rect(output->wlr_output, damage, &box, color); | 720 | scale_box(&box, output_scale); |
721 | } | 721 | render_rect(output->wlr_output, damage, &box, color); |
722 | } | ||
722 | 723 | ||
723 | if (view->border_right) { | 724 | if (view->border_right) { |
724 | memcpy(&color, colors->child_border, sizeof(float) * 4); | 725 | memcpy(&color, colors->child_border, sizeof(float) * 4); |
725 | color[3] *= con->alpha; | 726 | color[3] *= con->alpha; |
726 | box.x = view->x + view->width; | 727 | box.x = view->x + view->width; |
727 | box.y = con->y + config->border_thickness * 2 + config->font_height; | 728 | box.y = con->y + config->border_thickness * 2 + config->font_height; |
728 | box.width = view->border_thickness; | 729 | box.width = view->border_thickness; |
729 | box.height = view->height; | 730 | box.height = view->height; |
730 | scale_box(&box, output_scale); | 731 | scale_box(&box, output_scale); |
731 | render_rect(output->wlr_output, damage, &box, color); | 732 | render_rect(output->wlr_output, damage, &box, color); |
732 | } | 733 | } |
733 | 734 | ||
734 | if (view->border_bottom) { | 735 | if (view->border_bottom) { |
735 | memcpy(&color, colors->child_border, sizeof(float) * 4); | 736 | memcpy(&color, colors->child_border, sizeof(float) * 4); |
736 | color[3] *= con->alpha; | 737 | color[3] *= con->alpha; |
737 | box.x = con->x; | 738 | box.x = con->x; |
738 | box.y = view->y + view->height; | 739 | box.y = view->y + view->height; |
739 | box.width = con->width; | 740 | box.width = con->width; |
740 | box.height = view->border_thickness; | 741 | box.height = view->border_thickness; |
741 | scale_box(&box, output_scale); | 742 | scale_box(&box, output_scale); |
742 | render_rect(output->wlr_output, damage, &box, color); | 743 | render_rect(output->wlr_output, damage, &box, color); |
744 | } | ||
743 | } | 745 | } |
744 | } | 746 | } |
745 | 747 | ||