Skip to content

Commit 5582b7e

Browse files
authored
Merge pull request #122 from weihsinyeh/blur
Fix incorrect setting of stack blur
2 parents 4bb784a + f61e2b5 commit 5582b7e

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

apps/multi.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -304,15 +304,17 @@ static void apps_blur(twin_screen_t *screen, int x, int y, int w, int h)
304304
twin_composite(scaled_background, 0, 0, &srcop, 0, 0, 0, 0, 0, TWIN_SOURCE,
305305
scaled_background->width, scaled_background->height);
306306

307-
/* Apply blur effect to the scaled background */
308-
twin_stack_blur(scaled_background, 16, 0, scaled_background->width - 1, 0,
307+
/*
308+
* Apply blur effect to the scaled background. The valid kernel size range
309+
* is from 1 to 15.
310+
*/
311+
twin_stack_blur(scaled_background, 15, 0, scaled_background->width - 1, 0,
309312
scaled_background->height - 1);
310313

311314
/* Copy the blurred background to the window */
312315
srcop.u.pixmap = scaled_background;
313-
twin_composite(window->pixmap, window->client.left, window->client.top,
314-
&srcop, 0, 0, NULL, 0, 0, TWIN_SOURCE, client_width,
315-
client_height);
316+
twin_composite(window->pixmap, 0, 0, &srcop, 0, 0, NULL, 0, 0, TWIN_SOURCE,
317+
client_width, client_height);
316318

317319
twin_pixmap_destroy(scaled_background);
318320
twin_pixmap_destroy(raw_background);

configs/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ config VERTICAL_OFFSET
8989
config SHADOW_BLUR
9090
int "Shadow blur radius"
9191
default 10
92-
range 1 10
92+
range 1 15
9393
depends on DROP_SHADOW
9494

9595
endmenu

0 commit comments

Comments
 (0)