3
0
mirror of https://github.com/hyprwm/Hyprland.git synced 2026-02-04 04:35:31 +00:00

desktop/ruleApplicator: fix typo in border color rule parsing (#12995)

ref https://github.com/hyprwm/Hyprland/discussions/12746
This commit is contained in:
Vaxry
2026-01-16 16:43:25 +01:00
committed by GitHub
parent eff484b96c
commit fec17e5e79
2 changed files with 18 additions and 1 deletions

View File

@ -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;

View File

@ -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")) {