summaryrefslogtreecommitdiff
path: root/sway/desktop/render.c
diff options
context:
space:
mode:
authorErik Reider <[email protected]>2023-01-02 22:17:00 +0100
committerGitHub <[email protected]>2023-01-02 16:17:00 -0500
commitb9174c4692332db66a3da7dcb48009506352f035 (patch)
tree3dd33470d7f8b3157a507d24dc83f7c04b9bcf8e /sway/desktop/render.c
parenta6f60eeb31c341819611da9f844d4687b3160706 (diff)
Fixed top and bottom borders being to large (#81)
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r--sway/desktop/render.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index 7a985def..6247d937 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -511,10 +511,11 @@ static void render_view(struct sway_output *output, pixman_region32_t *damage,
box.y = floor(state->content_y + state->content_height);
box.width = state->width;
box.height = state->border_thickness;
+
// adjust sizing for rounded border corners
if (deco_data.corner_radius) {
- box.x += deco_data.corner_radius;
- box.width -= 2 * deco_data.corner_radius;
+ box.x += deco_data.corner_radius + state->border_thickness;
+ box.width -= 2 * (deco_data.corner_radius + state->border_thickness);
}
scale_box(&box, output_scale);
render_rect(output, damage, &box, color);
@@ -860,10 +861,11 @@ static void render_top_border(struct sway_output *output,
box.y = floor(state->y);
box.width = state->width;
box.height = state->border_thickness;
+
// adjust sizing for rounded border corners
if (corner_radius) {
- box.x += corner_radius;
- box.width -= 2 * corner_radius;
+ box.x += corner_radius + state->border_thickness;
+ box.width -= 2 * (corner_radius + state->border_thickness);
}
scale_box(&box, output_scale);
render_rect(output, output_damage, &box, color);