diff options
author | amy <[email protected]> | 2024-10-09 10:25:07 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2024-10-09 11:25:07 -0400 |
commit | 5ee4d73771d0283f573f75a7fc80b1c263fda687 (patch) | |
tree | 2299e1b3def6b441b6f3fa845503ba9d1342848f | |
parent | 91e6591fd63269e6ff0e17460732409133c09ecb (diff) |
-rw-r--r-- | sway/desktop/render.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 16d7b87f..a43797bb 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -1161,9 +1161,11 @@ static void render_top_border(struct fx_render_context *ctx, struct sway_contain // Child border - top edge memcpy(&color, colors->child_border, sizeof(float) * 4); premultiply_alpha(color, con->alpha); - box.x = floor(state->x) + corner_radius; + box.x = floor(state->x) + + (corner_radius != 0) * (corner_radius + state->border_thickness); box.y = floor(state->y); - box.width = state->width - (2 * corner_radius); + box.width = state->width - + ((corner_radius != 0) * 2 * (corner_radius + state->border_thickness)); box.height = state->border_thickness; scale_box(&box, output_scale); render_rect(ctx, &box, color); |