From e4c3990cba58bc9c41afc8db6d115a3f9de05022 Mon Sep 17 00:00:00 2001 From: HuntedByTheIRS Date: Thu, 2 Jul 2026 19:44:49 -0400 Subject: [PATCH] feat(config): parse effects.windows.shadows from Lua config Add CfgEffectsWindowShadows struct (12 fields) and CfgEffectsWindows.shadows member. Add wlr_scene_shadow *shadow field to Client struct for runtime shadow node tracking. Update example/config.lua with full shadow config block. The config parser handles missing shadows table gracefully (all default). --- example/config.lua | 18 +++++++++++++++++- include/client.h | 2 ++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/example/config.lua b/example/config.lua index 130bfac..ef95723 100644 --- a/example/config.lua +++ b/example/config.lua @@ -59,7 +59,23 @@ monitors = { effects = { windows = { rounded = false, - rounding = "none", + rounding = "none", -- off, light, or heavy + + shadows = { + shadows = true, + shadow_radius = 24, + shadow_offset_x = 0, + shadow_offset_y = 8, + shadow_color = 0x000000ff, + shadow_opacity = 0.30, + shadow_expand = 12, + + fullscreen_shadows = false, + nogaps_shadows = false, + maximized_shadows = false, + only_floating = false, + shadow_clip = true, + }, }, } diff --git a/include/client.h b/include/client.h index f378059..b161388 100644 --- a/include/client.h +++ b/include/client.h @@ -14,6 +14,7 @@ struct wlr_layer_surface_v1; struct wlr_xdg_surface; struct wlr_xwayland_surface; struct wlr_xdg_toplevel_decoration_v1; +struct wlr_scene_shadow; /* Client types */ enum { XDGShell, LayerShell, X11 }; @@ -54,6 +55,7 @@ typedef struct Client { #endif unsigned int bw; int corner_radius; + struct wlr_scene_shadow *shadow; uint32_t tags; int isfloating, isurgent, isfullscreen, isscratchpad; uint32_t resize; /* configure serial of a pending resize */