aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/output.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-20 15:34:08 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-21 20:16:56 +1000
commit5ab4930185d32c5ac1adbf56f7b74525a2bab98d (patch)
treeb81bf4c3de475720770c567639f0d9459a307fe9 /sway/desktop/output.c
parentUse class or app_id in tree representation (diff)
downloadsway-5ab4930185d32c5ac1adbf56f7b74525a2bab98d.tar.gz
sway-5ab4930185d32c5ac1adbf56f7b74525a2bab98d.tar.zst
sway-5ab4930185d32c5ac1adbf56f7b74525a2bab98d.zip
Fix tab border issues
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r--sway/desktop/output.c60
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