mirror of
https://github.com/swaywm/sway.git
synced 2026-04-22 06:46:27 -04:00
feat: Add box shadows (#64)
Co-authored-by: Erik Reider <35975961+ErikReider@users.noreply.github.com>
This commit is contained in:
parent
1baba77c74
commit
588ea8e290
20 changed files with 388 additions and 13 deletions
|
|
@ -178,6 +178,9 @@ sway_cmd cmd_scratchpad;
|
|||
sway_cmd cmd_seamless_mouse;
|
||||
sway_cmd cmd_set;
|
||||
sway_cmd cmd_shortcuts_inhibitor;
|
||||
sway_cmd cmd_shadow_blur_radius;
|
||||
sway_cmd cmd_shadow_color;
|
||||
sway_cmd cmd_shadows;
|
||||
sway_cmd cmd_show_marks;
|
||||
sway_cmd cmd_smart_borders;
|
||||
sway_cmd cmd_smart_gaps;
|
||||
|
|
|
|||
|
|
@ -482,6 +482,9 @@ struct sway_config {
|
|||
float unfocused[4];
|
||||
float urgent[4];
|
||||
} dim_inactive_colors;
|
||||
bool shadow_enabled;
|
||||
int shadow_blur_sigma;
|
||||
float shadow_color[4];
|
||||
|
||||
char *swaynag_command;
|
||||
struct swaynag_instance swaynag_config_errors;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ struct fx_renderer {
|
|||
|
||||
float projection[9];
|
||||
|
||||
GLuint stencil_buffer_id;
|
||||
|
||||
struct {
|
||||
bool OES_egl_image_external;
|
||||
} exts;
|
||||
|
|
@ -84,6 +86,17 @@ struct fx_renderer {
|
|||
GLint half_thickness;
|
||||
} corner;
|
||||
|
||||
struct {
|
||||
GLuint program;
|
||||
GLint proj;
|
||||
GLint color;
|
||||
GLint pos_attrib;
|
||||
GLint position;
|
||||
GLint size;
|
||||
GLint blur_sigma;
|
||||
GLint corner_radius;
|
||||
} box_shadow;
|
||||
|
||||
struct gles2_tex_shader tex_rgba;
|
||||
struct gles2_tex_shader tex_rgbx;
|
||||
struct gles2_tex_shader tex_ext;
|
||||
|
|
@ -118,4 +131,7 @@ void fx_render_border_corner(struct fx_renderer *renderer, const struct wlr_box
|
|||
const float color[static 4], const float projection[static 9],
|
||||
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 projection[static 9], int radius, float blur_sigma);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -113,6 +113,8 @@ struct sway_container {
|
|||
// Hidden scratchpad containers have a NULL parent.
|
||||
bool scratchpad;
|
||||
|
||||
bool shadow_enabled;
|
||||
|
||||
float saturation;
|
||||
|
||||
float alpha;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue