mirror of
https://github.com/hyprwm/Hyprland
synced 2026-05-05 15:38:00 +02:00
fix
This commit is contained in:
parent
f36d44fbac
commit
f9e0d4800f
3 changed files with 7 additions and 0 deletions
|
|
@ -60,6 +60,7 @@ static const std::unordered_map<eWindowRuleEffect, std::string> EFFECT_STRINGS =
|
|||
{WINDOW_RULE_EFFECT_NO_VRR, "no_vrr"}, //
|
||||
{WINDOW_RULE_EFFECT_SCROLL_MOUSE, "scroll_mouse"}, //
|
||||
{WINDOW_RULE_EFFECT_SCROLL_TOUCHPAD, "scroll_touchpad"}, //
|
||||
{WINDOW_RULE_EFFECT_STAY_FOCUSED, "stay_focused"}, //
|
||||
};
|
||||
|
||||
std::optional<eWindowRuleEffect> Rule::matchWindowEffectFromString(const std::string_view& s) {
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ namespace Desktop::Rule {
|
|||
WINDOW_RULE_EFFECT_NO_VRR,
|
||||
WINDOW_RULE_EFFECT_SCROLL_MOUSE,
|
||||
WINDOW_RULE_EFFECT_SCROLL_TOUCHPAD,
|
||||
WINDOW_RULE_EFFECT_STAY_FOCUSED,
|
||||
};
|
||||
|
||||
std::optional<Vector2D> parseRelativeVector(PHLWINDOW w, const std::string& s);
|
||||
|
|
|
|||
|
|
@ -396,6 +396,11 @@ CWindowRuleApplicator::SRuleResult CWindowRuleApplicator::applyDynamicRule(const
|
|||
m_noVRR.second |= rule->getPropertiesMask();
|
||||
break;
|
||||
}
|
||||
case WINDOW_RULE_EFFECT_STAY_FOCUSED: {
|
||||
m_stayFocused.first.set(truthy(effect), Types::PRIORITY_WINDOW_RULE);
|
||||
m_stayFocused.second |= rule->getPropertiesMask();
|
||||
break;
|
||||
}
|
||||
case WINDOW_RULE_EFFECT_SCROLL_MOUSE: {
|
||||
try {
|
||||
m_scrollMouse.first.set(std::clamp(std::stof(effect), 0.01F, 10.F), Types::PRIORITY_WINDOW_RULE);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue