mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
feat: add shadow_only_floating option
This commit is contained in:
parent
e13ad18721
commit
e3c9c784b6
4 changed files with 8 additions and 1 deletions
|
|
@ -13,6 +13,7 @@ blur_params_saturation = 1.2
|
|||
|
||||
shadows = 0
|
||||
layer_shadows = 0
|
||||
shadow_only_floating = 1
|
||||
shadows_size = 10
|
||||
shadows_blur = 15
|
||||
shadows_position_x = 0
|
||||
|
|
|
|||
|
|
@ -217,6 +217,7 @@ typedef struct {
|
|||
int border_radius;
|
||||
struct blur_data blur_params;
|
||||
int shadows;
|
||||
int shadow_only_floating;
|
||||
int layer_shadows;
|
||||
unsigned int shadows_size;
|
||||
float shadows_blur;
|
||||
|
|
@ -940,6 +941,8 @@ void parse_config_line(Config *config, const char *line) {
|
|||
config->blur_params.saturation = atof(value);
|
||||
} else if (strcmp(key, "shadows") == 0) {
|
||||
config->shadows = atoi(value);
|
||||
} else if (strcmp(key, "shadow_only_floating") == 0) {
|
||||
config->shadow_only_floating = atoi(value);
|
||||
} else if (strcmp(key, "layer_shadows") == 0) {
|
||||
config->layer_shadows = atoi(value);
|
||||
} else if (strcmp(key, "shadows_size") == 0) {
|
||||
|
|
@ -2218,6 +2221,7 @@ void override_config(void) {
|
|||
blur_params.contrast = CLAMP_FLOAT(config.blur_params.contrast, 0, 1);
|
||||
blur_params.saturation = CLAMP_FLOAT(config.blur_params.saturation, 0, 1);
|
||||
shadows = CLAMP_INT(config.shadows, 0, 1);
|
||||
shadow_only_floating = CLAMP_INT(config.shadow_only_floating, 0, 1);
|
||||
layer_shadows = CLAMP_INT(config.layer_shadows, 0, 1);
|
||||
shadows_size = CLAMP_INT(config.shadows_size, 0, 100);
|
||||
shadows_blur = CLAMP_INT(config.shadows_blur, 0, 100);
|
||||
|
|
@ -2358,6 +2362,7 @@ void set_value_default() {
|
|||
config.blur_params.contrast = blur_params_contrast;
|
||||
config.blur_params.saturation = blur_params_saturation;
|
||||
config.shadows = shadows;
|
||||
config.shadow_only_floating = shadow_only_floating;
|
||||
config.layer_shadows = layer_shadows;
|
||||
config.shadows_size = shadows_size;
|
||||
config.shadows_blur = shadows_blur;
|
||||
|
|
|
|||
|
|
@ -192,6 +192,7 @@ float blur_params_contrast = 0.9;
|
|||
float blur_params_saturation = 1.2;
|
||||
|
||||
int shadows = 0;
|
||||
int shadow_only_floating = 1;
|
||||
int layer_shadows = 0;
|
||||
unsigned int shadows_size = 10;
|
||||
double shadows_blur = 15;
|
||||
|
|
|
|||
|
|
@ -1214,7 +1214,7 @@ void client_draw_shadow(Client *c) {
|
|||
if (c->iskilling || !client_surface(c)->mapped)
|
||||
return;
|
||||
|
||||
if (!shadows || !c->isfloating) {
|
||||
if (!shadows || (!c->isfloating && shadow_only_floating)) {
|
||||
wlr_scene_shadow_set_size(c->shadow, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue