From 471c71f65c3c15ebe633edf4757361649757f990 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sat, 20 Dec 2025 11:39:53 +0800 Subject: [PATCH] feat: add windowrule option isnoradius --- src/animation/client.h | 5 +++-- src/config/parse_config.h | 4 ++++ src/mango.c | 4 ++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/animation/client.h b/src/animation/client.h index eb9ff4e..596336f 100644 --- a/src/animation/client.h +++ b/src/animation/client.h @@ -240,8 +240,9 @@ void buffer_set_effect(Client *c, BufferData data) { if (c == grabc) data.should_scale = false; - if (c->isfullscreen || (no_radius_when_single && c->mon && - c->mon->visible_tiling_clients == 1)) { + if (c->isnoradius || c->isfullscreen || + (no_radius_when_single && c->mon && + c->mon->visible_tiling_clients == 1)) { data.corner_location = CORNER_LOCATION_NONE; } diff --git a/src/config/parse_config.h b/src/config/parse_config.h index 1d66f34..074b522 100644 --- a/src/config/parse_config.h +++ b/src/config/parse_config.h @@ -64,6 +64,7 @@ typedef struct { const char *layer_animation_type_close; int isnoborder; int isnoshadow; + int isnoradius; int isnoanimation; int isopensilent; int istagsilent; @@ -1705,6 +1706,7 @@ void parse_option(Config *config, char *key, char *value) { rule->isfullscreen = -1; rule->isnoborder = -1; rule->isnoshadow = -1; + rule->isnoradius = -1; rule->isnoanimation = -1; rule->isopensilent = -1; rule->istagsilent = -1; @@ -1794,6 +1796,8 @@ void parse_option(Config *config, char *key, char *value) { rule->isnoborder = atoi(val); } else if (strcmp(key, "isnoshadow") == 0) { rule->isnoshadow = atoi(val); + } else if (strcmp(key, "isnoradius") == 0) { + rule->isnoradius = atoi(val); } else if (strcmp(key, "isnoanimation") == 0) { rule->isnoanimation = atoi(val); } else if (strcmp(key, "isopensilent") == 0) { diff --git a/src/mango.c b/src/mango.c index 4d685ec..4570a20 100644 --- a/src/mango.c +++ b/src/mango.c @@ -364,6 +364,7 @@ struct Client { int isglobal; int isnoborder; int isnoshadow; + int isnoradius; int isnoanimation; int isopensilent; int istagsilent; @@ -1214,6 +1215,7 @@ static void apply_rule_properties(Client *c, const ConfigWinRule *r) { APPLY_INT_PROP(c, r, isfullscreen); APPLY_INT_PROP(c, r, isnoborder); APPLY_INT_PROP(c, r, isnoshadow); + APPLY_INT_PROP(c, r, isnoradius); APPLY_INT_PROP(c, r, isnoanimation); APPLY_INT_PROP(c, r, isopensilent); APPLY_INT_PROP(c, r, istagsilent); @@ -3721,6 +3723,8 @@ void init_client_properties(Client *c) { c->no_force_center = 0; c->isnoborder = 0; c->isnosizehint = 0; + c->isnoradius = 0; + c->isnoshadow = 0; c->ignore_maximize = 1; c->ignore_minimize = 1; c->iscustomsize = 0;