summaryrefslogtreecommitdiff
path: root/src/desktop/rule/windowRule/WindowRuleEffectContainer.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/windowRule/WindowRuleEffectContainer.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/windowRule/WindowRuleEffectContainer.cpp')
-rw-r--r--src/desktop/rule/windowRule/WindowRuleEffectContainer.cpp76
1 files changed, 76 insertions, 0 deletions
diff --git a/src/desktop/rule/windowRule/WindowRuleEffectContainer.cpp b/src/desktop/rule/windowRule/WindowRuleEffectContainer.cpp
new file mode 100644
index 00000000..660bf871
--- /dev/null
+++ b/src/desktop/rule/windowRule/WindowRuleEffectContainer.cpp
@@ -0,0 +1,76 @@
+#include "WindowRuleEffectContainer.hpp"
+
+using namespace Desktop;
+using namespace Desktop::Rule;
+
+//
+SP<CWindowRuleEffectContainer> Rule::windowEffects() {
+ static SP<CWindowRuleEffectContainer> container = makeShared<CWindowRuleEffectContainer>();
+ return container;
+}
+
+static const std::vector<std::string> EFFECT_STRINGS = {
+ "__internal_none", //
+ "float", //
+ "tile", //
+ "fullscreen", //
+ "maximize", //
+ "fullscreen_state", //
+ "move", //
+ "size", //
+ "center", //
+ "pseudo", //
+ "monitor", //
+ "workspace", //
+ "no_initial_focus", //
+ "pin", //
+ "group", //
+ "suppress_event", //
+ "content", //
+ "no_close_for", //
+ "rounding", //
+ "rounding_power", //
+ "persistent_size", //
+ "animation", //
+ "border_color", //
+ "idle_inhibit", //
+ "opacity", //
+ "tag", //
+ "max_size", //
+ "min_size", //
+ "border_size", //
+ "allows_input", //
+ "dim_around", //
+ "decorate", //
+ "focus_on_activate", //
+ "keep_aspect_ratio", //
+ "nearest_neighbor", //
+ "no_anim", //
+ "no_blur", //
+ "no_dim", //
+ "no_focus", //
+ "no_follow_mouse", //
+ "no_max_size", //
+ "no_shadow", //
+ "no_shortcuts_inhibit", //
+ "opaque", //
+ "force_rgbx", //
+ "sync_fullscreen", //
+ "immediate", //
+ "xray", //
+ "render_unfocused", //
+ "no_screen_share", //
+ "no_vrr", //
+ "scroll_mouse", //
+ "scroll_touchpad", //
+ "stay_focused", //
+ "__internal_last_static", //
+};
+
+// This is here so that if we change the rules, we get reminded to update
+// the strings.
+static_assert(WINDOW_RULE_EFFECT_LAST_STATIC == 54);
+
+CWindowRuleEffectContainer::CWindowRuleEffectContainer() : IEffectContainer<eWindowRuleEffect>(std::vector<std::string>{EFFECT_STRINGS}) {
+ ;
+}