aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-05-20 15:34:08 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-05-21 20:16:56 +1000
commit5ab4930185d32c5ac1adbf56f7b74525a2bab98d (patch)
treeb81bf4c3de475720770c567639f0d9459a307fe9 /sway/desktop
parent4672cb7ccfcba0c628e4f04cc1abcad7d769bb3d (diff)
downloadsway-5ab4930185d32c5ac1adbf56f7b74525a2bab98d.tar.xz
Fix tab border issues
Diffstat (limited to 'sway/desktop')
-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,
float output_scale = output->wlr_output->scale;
float color[4];
- if (view->border_left) {
- memcpy(&color, colors->child_border, sizeof(float) * 4);
- color[3] *= con->alpha;
- box.x = con->x;
- box.y = con->y + config->border_thickness * 2 + config->font_height;
- box.width = view->border_thickness;
- box.height = view->height;
- scale_box(&box, output_scale);
- render_rect(output->wlr_output, damage, &box, color);
- }
+ if (view->border != B_NONE) {
+ if (view->border_left) {
+ memcpy(&color, colors->child_border, sizeof(float) * 4);
+ color[3] *= con->alpha;
+ box.x = con->x;
+ box.y = con->y + config->border_thickness * 2 + config->font_height;
+ box.width = view->border_thickness;
+ box.height = view->height;
+ scale_box(&box, output_scale);
+ render_rect(output->wlr_output, damage, &box, color);
+ }
- if (view->border_right) {
- memcpy(&color, colors->child_border, sizeof(float) * 4);
- color[3] *= con->alpha;
- box.x = view->x + view->width;
- box.y = con->y + config->border_thickness * 2 + config->font_height;
- box.width = view->border_thickness;
- box.height = view->height;
- scale_box(&box, output_scale);
- render_rect(output->wlr_output, damage, &box, color);
- }
+ if (view->border_right) {
+ memcpy(&color, colors->child_border, sizeof(float) * 4);
+ color[3] *= con->alpha;
+ box.x = view->x + view->width;
+ box.y = con->y + config->border_thickness * 2 + config->font_height;
+ box.width = view->border_thickness;
+ box.height = view->height;
+ scale_box(&box, output_scale);
+ render_rect(output->wlr_output, damage, &box, color);
+ }
- if (view->border_bottom) {
- memcpy(&color, colors->child_border, sizeof(float) * 4);
- color[3] *= con->alpha;
- box.x = con->x;
- box.y = view->y + view->height;
- box.width = con->width;
- box.height = view->border_thickness;
- scale_box(&box, output_scale);
- render_rect(output->wlr_output, damage, &box, color);
+ if (view->border_bottom) {
+ memcpy(&color, colors->child_border, sizeof(float) * 4);
+ color[3] *= con->alpha;
+ box.x = con->x;
+ box.y = view->y + view->height;
+ box.width = con->width;
+ box.height = view->border_thickness;
+ scale_box(&box, output_scale);
+ render_rect(output->wlr_output, damage, &box, color);
+ }
}
}