From ca42d414536c167f951e23bfc50d5edabb6f9dc2 Mon Sep 17 00:00:00 2001 From: famfo Date: Fri, 22 Dec 2023 06:08:09 +0000 Subject: Implement shadow_offset (#255) --- include/sway/commands.h | 1 + include/sway/config.h | 1 + include/sway/desktop/fx_renderer/fx_renderer.h | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/sway/commands.h b/include/sway/commands.h index b4166284..c29d4ff4 100644 --- a/include/sway/commands.h +++ b/include/sway/commands.h @@ -192,6 +192,7 @@ sway_cmd cmd_set; sway_cmd cmd_shortcuts_inhibitor; sway_cmd cmd_shadow_blur_radius; sway_cmd cmd_shadow_color; +sway_cmd cmd_shadow_offset; sway_cmd cmd_shadow_inactive_color; sway_cmd cmd_shadows; sway_cmd cmd_shadows_on_csd; diff --git a/include/sway/config.h b/include/sway/config.h index 9f23bacf..81213dbc 100644 --- a/include/sway/config.h +++ b/include/sway/config.h @@ -493,6 +493,7 @@ struct sway_config { int shadow_blur_sigma; float shadow_color[4]; float shadow_inactive_color[4]; + float shadow_offset_x, shadow_offset_y; bool blur_enabled; bool blur_xray; diff --git a/include/sway/desktop/fx_renderer/fx_renderer.h b/include/sway/desktop/fx_renderer/fx_renderer.h index 410e3d94..bfae7b72 100644 --- a/include/sway/desktop/fx_renderer/fx_renderer.h +++ b/include/sway/desktop/fx_renderer/fx_renderer.h @@ -207,8 +207,8 @@ void fx_render_border_corner(struct fx_renderer *renderer, const struct wlr_box enum corner_location corner_location, int radius, int border_thickness); void fx_render_box_shadow(struct fx_renderer *renderer, const struct wlr_box *box, - const float color[static 4], const float matrix[static 9], int radius, - float blur_sigma); + const struct wlr_box *inner_box, const float color[static 4], + const float matrix[static 9], int corner_radius, float blur_sigma); void fx_render_blur(struct fx_renderer *renderer, const float matrix[static 9], struct fx_framebuffer **buffer, struct blur_shader *shader, const struct wlr_box *box, -- cgit v1.2.3