diff --git a/src/animation/client.h b/src/animation/client.h index 570031c..79736b9 100644 --- a/src/animation/client.h +++ b/src/animation/client.h @@ -230,7 +230,7 @@ void buffer_set_effect(Client *c, BufferData data) { void apply_border(Client *c) { bool hit_no_border = false; - if (c->iskilling || !client_surface(c)->mapped) + if (c->iskilling || !client_surface(c)->mapped || c->isnoshadow) return; hit_no_border = check_hit_no_border(c); @@ -767,6 +767,11 @@ void client_set_pending_state(Client *c) { c->animation.duration = 0; } + if (c->isnoanimation) { + c->animation.should_animate = false; + c->animation.duration = 0; + } + // 开始动画 client_commit(c); c->dirty = true; diff --git a/src/config/parse_config.h b/src/config/parse_config.h index 7df4124..e03a8f4 100644 --- a/src/config/parse_config.h +++ b/src/config/parse_config.h @@ -61,6 +61,8 @@ typedef struct { const char *layer_animation_type_open; const char *layer_animation_type_close; int isnoborder; + int isnoshadow; + int isnoanimation; int isopensilent; int istagsilent; int isnamedscratchpad; @@ -1634,6 +1636,8 @@ void parse_option(Config *config, char *key, char *value) { rule->isfloating = -1; rule->isfullscreen = -1; rule->isnoborder = -1; + rule->isnoshadow = -1; + rule->isnoanimation = -1; rule->isopensilent = -1; rule->istagsilent = -1; rule->isnamedscratchpad = -1; @@ -1714,6 +1718,10 @@ void parse_option(Config *config, char *key, char *value) { rule->height = atoi(val); } else if (strcmp(key, "isnoborder") == 0) { rule->isnoborder = atoi(val); + } else if (strcmp(key, "isnoshadow") == 0) { + rule->isnoshadow = atoi(val); + } else if (strcmp(key, "isnoanimation") == 0) { + rule->isnoanimation = atoi(val); } else if (strcmp(key, "isopensilent") == 0) { rule->isopensilent = atoi(val); } else if (strcmp(key, "istagsilent") == 0) { diff --git a/src/mango.c b/src/mango.c index 838d4d2..146d9a0 100644 --- a/src/mango.c +++ b/src/mango.c @@ -330,6 +330,8 @@ struct Client { int is_scratchpad_show; int isglobal; int isnoborder; + int isnoshadow; + int isnoanimation; int isopensilent; int istagsilent; int iskilling; @@ -1144,6 +1146,8 @@ static void apply_rule_properties(Client *c, const ConfigWinRule *r) { APPLY_INT_PROP(c, r, isfloating); APPLY_INT_PROP(c, r, isfullscreen); APPLY_INT_PROP(c, r, isnoborder); + APPLY_INT_PROP(c, r, isnoshadow); + APPLY_INT_PROP(c, r, isnoanimation); APPLY_INT_PROP(c, r, isopensilent); APPLY_INT_PROP(c, r, istagsilent); APPLY_INT_PROP(c, r, isnamedscratchpad);