From 94a6340f9fd098784e19757f504c989284e31908 Mon Sep 17 00:00:00 2001 From: William McKinnon Date: Thu, 4 May 2023 22:13:08 -0400 Subject: [PATCH 1/2] updated flake lock --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 0fb8f1a2..2c645ce5 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1650374568, - "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", "owner": "edolstra", "repo": "flake-compat", - "rev": "b4a34015c698c7793d592d66adbab377907a2be8", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", "type": "github" }, "original": { @@ -18,11 +18,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1673947312, - "narHash": "sha256-xx/2nRwRy3bXrtry6TtydKpJpqHahjuDB5sFkQ/XNDE=", + "lastModified": 1683048793, + "narHash": "sha256-XA1Y70qnX08eAYFfq4k9L1Bdu37+zm28B32w7d+155o=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2d38b664b4400335086a713a0036aafaa002c003", + "rev": "e4ad893057db74091ed0e3edf509a72fb83051df", "type": "github" }, "original": { From 6e53c04abf34599a6c36d1fb57df26d641bee8a1 Mon Sep 17 00:00:00 2001 From: William McKinnon Date: Fri, 5 May 2023 16:07:50 -0400 Subject: [PATCH 2/2] fix: shadow clipping & shadow corners (#153) --- sway/desktop/render.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 18fcfaa6..6316a839 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -675,8 +675,8 @@ void render_box_shadow(struct sway_output *output, pixman_region32_t *output_dam struct wlr_box box; memcpy(&box, _box, sizeof(struct wlr_box)); - box.x -= output->lx * wlr_output->scale + blur_sigma; - box.y -= output->ly * wlr_output->scale + blur_sigma; + box.x -= blur_sigma; + box.y -= blur_sigma; box.width += 2 * blur_sigma; box.height += 2 * blur_sigma; @@ -875,15 +875,13 @@ static void render_view(struct sway_output *output, pixman_region32_t *damage, // render shadow if (con->shadow_enabled && config->shadow_blur_sigma > 0 && config->shadow_color[3] > 0.0) { - box.x = floor(state->x); - box.y = floor(state->y); + box.x = floor(state->x) - output->lx; + box.y = floor(state->y) - output->ly; box.width = state->width; box.height = state->height; scale_box(&box, output_scale); - int corner_radius = config->smart_corner_radius && - output->current.active_workspace->current_gaps.top == 0 - ? 0 : con->corner_radius; - int scaled_corner_radius = (corner_radius + state->border_thickness) * output_scale; + int scaled_corner_radius = deco_data.corner_radius == 0 ? + 0 : (deco_data.corner_radius + state->border_thickness) * output_scale; render_box_shadow(output, damage, &box, config->shadow_color, config->shadow_blur_sigma, scaled_corner_radius); }