windowrules: add noclosefor

fixes #10027
This commit is contained in:
Vaxry
2025-04-29 18:14:02 +01:00
parent 5bd7ff884d
commit b10a43dabc
6 changed files with 23 additions and 6 deletions

View File

@@ -8,9 +8,9 @@ static const auto RULES = std::unordered_set<std::string>{
"float", "fullscreen", "maximize", "noinitialfocus", "pin", "stayfocused", "tile", "renderunfocused", "persistentsize",
};
static const auto RULES_PREFIX = std::unordered_set<std::string>{
"animation", "bordercolor", "bordersize", "center", "content", "fullscreenstate", "group", "idleinhibit", "maxsize", "minsize",
"monitor", "move", "opacity", "plugin:", "prop", "pseudo", "rounding", "roundingpower", "scrollmouse", "scrolltouchpad",
"size", "suppressevent", "tag", "workspace", "xray",
"animation", "bordercolor", "bordersize", "center", "content", "fullscreenstate", "group", "idleinhibit", "maxsize", "minsize", "monitor",
"move", "noclosefor", "opacity", "plugin:", "prop", "pseudo", "rounding", "roundingpower", "scrollmouse", "scrolltouchpad", "size",
"suppressevent", "tag", "workspace", "xray",
};
CWindowRule::CWindowRule(const std::string& rule, const std::string& value, bool isV2, bool isExecRule) : m_value(value), m_rule(rule), m_v2(isV2), m_execRule(isExecRule) {
@@ -79,6 +79,8 @@ CWindowRule::CWindowRule(const std::string& rule, const std::string& value, bool
m_ruleType = RULE_PROP;
else if (rule.starts_with("content"))
m_ruleType = RULE_CONTENT;
else if (rule.starts_with("noclosefor"))
m_ruleType = RULE_NOCLOSEFOR;
else {
// check if this is a prop.
const CVarList VARS(rule, 0, 's', true);