diff options
| author | ItsOhen <TNordfeldt@gmail.com> | 2026-02-26 19:13:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-26 18:13:49 +0000 |
| commit | 70cdd819e4bee3c4dcea6961d32e61e6afe4eeb0 (patch) | |
| tree | 0dd574ddc06adf3fe3f82ba1aeae607f60f0ba45 /src/desktop/rule/Rule.cpp | |
| parent | cc14dd1baf69c01aede38572a0843e03bfdea5e0 (diff) | |
desktop/rules: use pid for exec rules (#13374)
Diffstat (limited to 'src/desktop/rule/Rule.cpp')
| -rw-r--r-- | src/desktop/rule/Rule.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/desktop/rule/Rule.cpp b/src/desktop/rule/Rule.cpp index 3d981587..ab5525e8 100644 --- a/src/desktop/rule/Rule.cpp +++ b/src/desktop/rule/Rule.cpp @@ -52,6 +52,7 @@ static const std::unordered_map<eRuleProperty, eRuleMatchEngine> RULE_ENGINES = {RULE_PROP_XDG_TAG, RULE_MATCH_ENGINE_REGEX}, // {RULE_PROP_NAMESPACE, RULE_MATCH_ENGINE_REGEX}, // {RULE_PROP_EXEC_TOKEN, RULE_MATCH_ENGINE_REGEX}, // + {RULE_PROP_EXEC_PID, RULE_MATCH_ENGINE_INT}, // }; const std::vector<std::string>& Rule::allMatchPropStrings() { @@ -125,10 +126,11 @@ const std::string& IRule::name() { return m_name; } -void IRule::markAsExecRule(const std::string& token, bool persistent) { +void IRule::markAsExecRule(const std::string& token, uint64_t pid, bool persistent) { m_execData.isExecRule = true; m_execData.isExecPersistent = persistent; m_execData.token = token; + m_execData.pid = pid; m_execData.expiresAt = Time::steadyNow() + std::chrono::minutes(1); } |
