diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-01-16 16:43:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-16 16:43:25 +0100 |
| commit | fec17e5e79d3c3718e7ff6c7499a5e4452bd8004 (patch) | |
| tree | c5738504f536d3d596f0032a14823e3e315558d4 | |
| parent | eff484b96c281035b5213baa926e886ef3900ef9 (diff) | |
desktop/ruleApplicator: fix typo in border color rule parsing (#12995)
ref https://github.com/hyprwm/Hyprland/discussions/12746
| -rw-r--r-- | hyprtester/src/tests/main/window.cpp | 17 | ||||
| -rw-r--r-- | src/desktop/rule/windowRule/WindowRuleApplicator.cpp | 2 |
2 files changed, 18 insertions, 1 deletions
diff --git a/hyprtester/src/tests/main/window.cpp b/hyprtester/src/tests/main/window.cpp index ea44cb24..a0187ab0 100644 --- a/hyprtester/src/tests/main/window.cpp +++ b/hyprtester/src/tests/main/window.cpp @@ -785,6 +785,23 @@ static bool test() { Tests::killAllWindows(); + OK(getFromSocket("/keyword windowrule[border-magic-kitty]:match:class border_kitty")); + OK(getFromSocket("/keyword windowrule[border-magic-kitty]:border_color rgba(c6ff00ff) rgba(ff0000ee) 45deg")); + + if (!spawnKitty("border_kitty")) + return false; + + OK(getFromSocket("/dispatch focuswindow class:border_kitty")); + + { + auto str = getFromSocket("/getprop active active_border_color"); + EXPECT_CONTAINS(str, "ffc6ff00"); + EXPECT_CONTAINS(str, "eeff0000"); + EXPECT_CONTAINS(str, "45deg"); + } + + Tests::killAllWindows(); + if (!spawnKitty("tag_kitty")) return false; diff --git a/src/desktop/rule/windowRule/WindowRuleApplicator.cpp b/src/desktop/rule/windowRule/WindowRuleApplicator.cpp index cb3a6f67..9a3f4f63 100644 --- a/src/desktop/rule/windowRule/WindowRuleApplicator.cpp +++ b/src/desktop/rule/windowRule/WindowRuleApplicator.cpp @@ -151,7 +151,7 @@ CWindowRuleApplicator::SRuleResult CWindowRuleApplicator::applyDynamicRule(const CGradientValueData activeBorderGradient = {}; CGradientValueData inactiveBorderGradient = {}; bool active = true; - CVarList colorsAndAngles = CVarList(trim(effect.substr(effect.find_first_of(' ') + 1)), 0, 's', true); + CVarList colorsAndAngles = CVarList(trim(effect), 0, 's', true); // Basic form has only two colors, everything else can be parsed as a gradient if (colorsAndAngles.size() == 2 && !colorsAndAngles[1].contains("deg")) { |
