summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-03-07 19:53:34 +0000
committerGitHub <noreply@github.com>2026-03-07 19:53:34 +0000
commita4ecae91600d7e8ceb31610176d6b40cb816711b (patch)
treeb7753624381d474b04c4d7ac32e2be7544603a11 /src
parent3cf62bea185384aa3c5442a2c5448ae1d62c9c0e (diff)
desktop/windowRule: fix matching CONTENT (#13636)
ref #13596
Diffstat (limited to 'src')
-rw-r--r--src/desktop/rule/Rule.cpp2
-rw-r--r--src/desktop/rule/windowRule/WindowRule.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/desktop/rule/Rule.cpp b/src/desktop/rule/Rule.cpp
index ab5525e8..5e3141cd 100644
--- a/src/desktop/rule/Rule.cpp
+++ b/src/desktop/rule/Rule.cpp
@@ -48,7 +48,7 @@ static const std::unordered_map<eRuleProperty, eRuleMatchEngine> RULE_ENGINES =
{RULE_PROP_FULLSCREENSTATE_INTERNAL, RULE_MATCH_ENGINE_INT}, //
{RULE_PROP_FULLSCREENSTATE_CLIENT, RULE_MATCH_ENGINE_INT}, //
{RULE_PROP_ON_WORKSPACE, RULE_MATCH_ENGINE_WORKSPACE}, //
- {RULE_PROP_CONTENT, RULE_MATCH_ENGINE_INT}, //
+ {RULE_PROP_CONTENT, RULE_MATCH_ENGINE_REGEX}, //
{RULE_PROP_XDG_TAG, RULE_MATCH_ENGINE_REGEX}, //
{RULE_PROP_NAMESPACE, RULE_MATCH_ENGINE_REGEX}, //
{RULE_PROP_EXEC_TOKEN, RULE_MATCH_ENGINE_REGEX}, //
diff --git a/src/desktop/rule/windowRule/WindowRule.cpp b/src/desktop/rule/windowRule/WindowRule.cpp
index 8028e482..08cd1603 100644
--- a/src/desktop/rule/windowRule/WindowRule.cpp
+++ b/src/desktop/rule/windowRule/WindowRule.cpp
@@ -97,7 +97,7 @@ bool CWindowRule::matches(PHLWINDOW w, bool allowEnvLookup) {
return false;
break;
case RULE_PROP_CONTENT:
- if (!engine->match(w->getContentType()) && !engine->match(NContentType::toString(w->getContentType())))
+ if (!engine->match(std::format("{}", sc<size_t>(w->getContentType()))) && !engine->match(NContentType::toString(w->getContentType())))
return false;
break;
case RULE_PROP_XDG_TAG: