Slicers that pull the exclusion-family rules out of a unified RuleSet, one slice per consumer concern: More...
#include <QStringList>#include "phosphorrules_export.h"Go to the source code of this file.
Namespaces | |
| namespace | PhosphorRules |
| namespace | PhosphorRules::ExclusionRules |
Functions | |
| PHOSPHORRULES_EXPORT RuleSet | PhosphorRules::ExclusionRules::excludeRulesFrom (const RuleSet &source) |
Slice source down to rules with a terminal Exclude action — the BLANKET-only shape. | |
| PHOSPHORRULES_EXPORT RuleSet | PhosphorRules::ExclusionRules::excludePlacementRulesFrom (const RuleSet &source) |
Slice source down to rules carrying a terminal Exclude OR ExcludePlacement action — the full set of rules that make a window unmanaged by the placement engines (snapping, autotile, scrolling). | |
| PHOSPHORRULES_EXPORT RuleSet | PhosphorRules::ExclusionRules::excludeDecorationsRulesFrom (const RuleSet &source) |
Slice source down to rules carrying a terminal Exclude OR ExcludeDecorations action — the set the KWin effect's shouldDecorateWindow gate binds. | |
| PHOSPHORRULES_EXPORT RuleSet | PhosphorRules::ExclusionRules::excludeAnimationsRulesFrom (const RuleSet &source) |
Slice source down to rules with a terminal ExcludeAnimations action — the action the v4 fold introduced for the legacy animationExcludedApplications / animationExcludedWindowClasses lists. | |
| PHOSPHORRULES_EXPORT QStringList | PhosphorRules::ExclusionRules::applicationExcludePatternsFrom (const RuleSet &source) |
Return the AppId pattern of every AppId AppIdMatches <pattern> leaf that lives on an enabled Exclude- or ExcludePlacement-action rule in source (both shapes make the window unmanaged by placement, and the placement prune this feeds is a placement concern). | |
Slicers that pull the exclusion-family rules out of a unified RuleSet, one slice per consumer concern:
After v4 (configmigration.cpp), exclusion rules live exclusively in the unified Rule store — the legacy excludedApplications / excludedWindowClasses and their animation-side siblings animationExcludedApplications / animationExcludedWindowClasses QStringList settings retired alongside the bridge that derived rules from them. Consumers ask THIS header "give me the slice of the user's unified rule store shaped for my exclusion concern".
LIFETIME / REVISION CONTRACT: every slicer returns a derived RuleSet BY VALUE whose revision is always 1. Sink it into a caller-owned long-lived set via setRules(slice.rules()) — which bumps the owner's monotonic revision, invalidating any bound evaluator's caches — and never bind a RuleEvaluator to the returned temporary (the evaluator stores a reference; binding the temporary dangles).
Declarations only — bodies live in src/exclusionrules.cpp so consumers pay one link edge (not a per-TU inline cost) and the internal predicates (ruleHasAction, rulesWithAction, rulesWithEitherAction, isPlacementExclusion) stay file-local. A previous shape had bodies inline in this header; that forced every consumer TU through the full transitive include chain (MatchExpression.h, RuleAction.h, Rule.h, …) and instantiated the function bodies under hidden visibility per TU. The slicers are not on a perf-critical path — the daemon calls them once per RuleStore::rulesChanged emission, not per resolution — so the inline win was zero and the include cost was real.