diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 13670fdc..ae1aacae 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -1271,9 +1271,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; adjust_box_to_workspace_offset(&box, on_focused_workspace, ctx->output); scale_box(&box, output_scale);