From c2670e9ab90bd657e87a1da2c5322e9007dce01f Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Mon, 17 Nov 2025 18:34:02 +0000 Subject: windowrules: rewrite completely (#12269) Reworks the window rule syntax completely --------- Co-authored-by: Mihai Fufezan --- .../rule/layerRule/LayerRuleEffectContainer.cpp | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/desktop/rule/layerRule/LayerRuleEffectContainer.cpp (limited to 'src/desktop/rule/layerRule/LayerRuleEffectContainer.cpp') 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 Rule::layerEffects() { + static SP container = makeShared(); + return container; +} + +static const std::vector 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(std::vector{EFFECT_STRINGS}) { + ; +} -- cgit v1.2.3