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:
@ -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;
|
||||
|
||||
|
||||
@ -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")) {
|
||||
|
||||
Reference in New Issue
Block a user