From b3067adf330a5a44cffe11a579384c75d9d44610 Mon Sep 17 00:00:00 2001 From: Wei-Hsin Yeh Date: Mon, 4 Aug 2025 14:01:30 +0800 Subject: [PATCH 1/2] Fix incorrect start position of client pixmap The pixmap of raw_background should start at coordinates (dst_x, dst_y) = (0, 0) relative to the client's window, instead of (window->client.left, window->client.top) relative to the client's window. Signed-off-by: Wei-Hsin Yeh --- apps/multi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/multi.c b/apps/multi.c index f7c55bb..f8f907a 100644 --- a/apps/multi.c +++ b/apps/multi.c @@ -310,9 +310,8 @@ static void apps_blur(twin_screen_t *screen, int x, int y, int w, int h) /* Copy the blurred background to the window */ srcop.u.pixmap = scaled_background; - twin_composite(window->pixmap, window->client.left, window->client.top, - &srcop, 0, 0, NULL, 0, 0, TWIN_SOURCE, client_width, - client_height); + twin_composite(window->pixmap, 0, 0, &srcop, 0, 0, NULL, 0, 0, TWIN_SOURCE, + client_width, client_height); twin_pixmap_destroy(scaled_background); twin_pixmap_destroy(raw_background); From f61e2b5ecbdbf72dd7ae70b0f843fb801ca9001b Mon Sep 17 00:00:00 2001 From: Wei-Hsin Yeh Date: Tue, 5 Aug 2025 15:20:51 +0800 Subject: [PATCH 2/2] Fix the incorrect kernel size in Stack Blur The valid kernel size range is from 1 to 15. Signed-off-by: Wei-Hsin Yeh --- apps/multi.c | 7 +++++-- configs/Kconfig | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/multi.c b/apps/multi.c index f8f907a..eda1425 100644 --- a/apps/multi.c +++ b/apps/multi.c @@ -304,8 +304,11 @@ static void apps_blur(twin_screen_t *screen, int x, int y, int w, int h) twin_composite(scaled_background, 0, 0, &srcop, 0, 0, 0, 0, 0, TWIN_SOURCE, scaled_background->width, scaled_background->height); - /* Apply blur effect to the scaled background */ - twin_stack_blur(scaled_background, 16, 0, scaled_background->width - 1, 0, + /* + * Apply blur effect to the scaled background. The valid kernel size range + * is from 1 to 15. + */ + twin_stack_blur(scaled_background, 15, 0, scaled_background->width - 1, 0, scaled_background->height - 1); /* Copy the blurred background to the window */ diff --git a/configs/Kconfig b/configs/Kconfig index c8c49b3..4a667c7 100644 --- a/configs/Kconfig +++ b/configs/Kconfig @@ -74,7 +74,7 @@ config VERTICAL_OFFSET config SHADOW_BLUR int "Shadow blur radius" default 10 - range 1 10 + range 1 15 depends on DROP_SHADOW endmenu