summaryrefslogtreecommitdiff
path: root/src/desktop/rule/layerRule/LayerRuleEffectContainer.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2025-11-17 18:34:02 +0000
committerGitHub <noreply@github.com>2025-11-17 18:34:02 +0000
commitc2670e9ab90bd657e87a1da2c5322e9007dce01f (patch)
treecd033fe3a9b87b1b0d457df043ecc50929ad3c8d /src/desktop/rule/layerRule/LayerRuleEffectContainer.cpp
parent95ee08b3403b90e2930d46425cada1d280f3524e (diff)
windowrules: rewrite completely (#12269)
Reworks the window rule syntax completely --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
Diffstat (limited to 'src/desktop/rule/layerRule/LayerRuleEffectContainer.cpp')
-rw-r--r--src/desktop/rule/layerRule/LayerRuleEffectContainer.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/desktop/rule/layerRule/LayerRuleEffectContainer.cpp b/src/desktop/rule/layerRule/LayerRuleEffectContainer.cpp
new file mode 100644
index 00000000..17394239
--- /dev/null
+++ b/src/desktop/rule/layerRule/LayerRuleEffectContainer.cpp
@@ -0,0 +1,33 @@
+#include "LayerRuleEffectContainer.hpp"
+
+using namespace Desktop;
+using namespace Desktop::Rule;
+
+//
+SP<CLayerRuleEffectContainer> Rule::layerEffects() {
+ static SP<CLayerRuleEffectContainer> container = makeShared<CLayerRuleEffectContainer>();
+ return container;
+}
+
+static const std::vector<std::string> EFFECT_STRINGS = {
+ "__internal_none", //
+ "no_anim", //
+ "blur", //
+ "blur_popups", //
+ "ignore_alpha", //
+ "dim_around", //
+ "xray", //
+ "animation", //
+ "order", //
+ "above_lock", //
+ "no_screen_share", //
+ "__internal_last_static", //
+};
+
+// This is here so that if we change the rules, we get reminded to update
+// the strings.
+static_assert(LAYER_RULE_EFFECT_LAST_STATIC == 11);
+
+CLayerRuleEffectContainer::CLayerRuleEffectContainer() : IEffectContainer<eLayerRuleEffect>(std::vector<std::string>{EFFECT_STRINGS}) {
+ ;
+}