From 6fda036dec23551ca00dcadbd15b1e537d387425 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Wed, 4 Mar 2026 12:17:44 +0800 Subject: [PATCH] feat: use monitor spec to match windowrule monitor field --- src/config/parse_config.h | 2 +- src/mango.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/parse_config.h b/src/config/parse_config.h index 132d6f2..9599da6 100644 --- a/src/config/parse_config.h +++ b/src/config/parse_config.h @@ -79,7 +79,7 @@ typedef struct { int32_t ignore_minimize; int32_t isnosizehint; int32_t indleinhibit_when_focus; - const char *monitor; + char *monitor; int32_t offsetx; int32_t offsety; int32_t width; diff --git a/src/mango.c b/src/mango.c index 76b596a..155b3fe 100644 --- a/src/mango.c +++ b/src/mango.c @@ -1465,7 +1465,7 @@ void applyrules(Client *c) { // set monitor of client wl_list_for_each(m, &mons, link) { - if (regex_match(r->monitor, m->wlr_output->name)) { + if (match_monitor_spec(r->monitor, m)) { mon = m; } }