feat: add windowrule option isnoshadow,isnoanimation
This commit is contained in:
@@ -251,7 +251,7 @@ void buffer_set_effect(Client *c, BufferData data) {
|
|||||||
|
|
||||||
void client_draw_shadow(Client *c) {
|
void client_draw_shadow(Client *c) {
|
||||||
|
|
||||||
if (c->iskilling || !client_surface(c)->mapped)
|
if (c->iskilling || !client_surface(c)->mapped || c->isnoshadow)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!shadows || (!c->isfloating && shadow_only_floating)) {
|
if (!shadows || (!c->isfloating && shadow_only_floating)) {
|
||||||
@@ -888,6 +888,11 @@ void client_set_pending_state(Client *c) {
|
|||||||
c->animation.duration = 0;
|
c->animation.duration = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (c->isnoanimation) {
|
||||||
|
c->animation.should_animate = false;
|
||||||
|
c->animation.duration = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// 开始动画
|
// 开始动画
|
||||||
client_commit(c);
|
client_commit(c);
|
||||||
c->dirty = true;
|
c->dirty = true;
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ typedef struct {
|
|||||||
const char *layer_animation_type_open;
|
const char *layer_animation_type_open;
|
||||||
const char *layer_animation_type_close;
|
const char *layer_animation_type_close;
|
||||||
int isnoborder;
|
int isnoborder;
|
||||||
|
int isnoshadow;
|
||||||
|
int isnoanimation;
|
||||||
int isopensilent;
|
int isopensilent;
|
||||||
int istagsilent;
|
int istagsilent;
|
||||||
int isnamedscratchpad;
|
int isnamedscratchpad;
|
||||||
@@ -1697,6 +1699,8 @@ void parse_option(Config *config, char *key, char *value) {
|
|||||||
rule->isfloating = -1;
|
rule->isfloating = -1;
|
||||||
rule->isfullscreen = -1;
|
rule->isfullscreen = -1;
|
||||||
rule->isnoborder = -1;
|
rule->isnoborder = -1;
|
||||||
|
rule->isnoshadow = -1;
|
||||||
|
rule->isnoanimation = -1;
|
||||||
rule->isopensilent = -1;
|
rule->isopensilent = -1;
|
||||||
rule->istagsilent = -1;
|
rule->istagsilent = -1;
|
||||||
rule->isnamedscratchpad = -1;
|
rule->isnamedscratchpad = -1;
|
||||||
@@ -1778,6 +1782,10 @@ void parse_option(Config *config, char *key, char *value) {
|
|||||||
rule->height = atoi(val);
|
rule->height = atoi(val);
|
||||||
} else if (strcmp(key, "isnoborder") == 0) {
|
} else if (strcmp(key, "isnoborder") == 0) {
|
||||||
rule->isnoborder = atoi(val);
|
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) {
|
} else if (strcmp(key, "isopensilent") == 0) {
|
||||||
rule->isopensilent = atoi(val);
|
rule->isopensilent = atoi(val);
|
||||||
} else if (strcmp(key, "istagsilent") == 0) {
|
} else if (strcmp(key, "istagsilent") == 0) {
|
||||||
|
|||||||
@@ -330,6 +330,8 @@ struct Client {
|
|||||||
int is_scratchpad_show;
|
int is_scratchpad_show;
|
||||||
int isglobal;
|
int isglobal;
|
||||||
int isnoborder;
|
int isnoborder;
|
||||||
|
int isnoshadow;
|
||||||
|
int isnoanimation;
|
||||||
int isopensilent;
|
int isopensilent;
|
||||||
int istagsilent;
|
int istagsilent;
|
||||||
int iskilling;
|
int iskilling;
|
||||||
@@ -1134,6 +1136,8 @@ static void apply_rule_properties(Client *c, const ConfigWinRule *r) {
|
|||||||
APPLY_INT_PROP(c, r, isfloating);
|
APPLY_INT_PROP(c, r, isfloating);
|
||||||
APPLY_INT_PROP(c, r, isfullscreen);
|
APPLY_INT_PROP(c, r, isfullscreen);
|
||||||
APPLY_INT_PROP(c, r, isnoborder);
|
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, isopensilent);
|
||||||
APPLY_INT_PROP(c, r, istagsilent);
|
APPLY_INT_PROP(c, r, istagsilent);
|
||||||
APPLY_INT_PROP(c, r, isnamedscratchpad);
|
APPLY_INT_PROP(c, r, isnamedscratchpad);
|
||||||
|
|||||||
Reference in New Issue
Block a user