core: Optimize window/layer rule application and scanning (#8735)

Optimizes window and layer rule parsing and later usage.
This commit is contained in:
Vaxry 2024-12-16 19:05:24 +01:00 committed by GitHub
parent eaac5c7cbd
commit dab50b3ef3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 866 additions and 609 deletions

28
src/desktop/LayerRule.hpp Normal file
View file

@ -0,0 +1,28 @@
#pragma once
#include <string>
#include <cstdint>
class CLayerRule {
public:
CLayerRule(const std::string& rule, const std::string& targetNS);
enum eRuleType : uint8_t {
RULE_INVALID = 0,
RULE_NOANIM,
RULE_BLUR,
RULE_BLURPOPUPS,
RULE_DIMAROUND,
RULE_IGNOREALPHA,
RULE_IGNOREZERO,
RULE_XRAY,
RULE_ANIMATION,
RULE_ORDER,
RULE_ZUMBA,
};
eRuleType ruleType = RULE_INVALID;
const std::string targetNamespace;
const std::string rule;
};