diff --git a/hyprbars/barDeco.cpp b/hyprbars/barDeco.cpp index cf0ed92..99dbf87 100644 --- a/hyprbars/barDeco.cpp +++ b/hyprbars/barDeco.cpp @@ -562,13 +562,13 @@ void CHyprBar::updateRules() { m_bTitleColorChanged = true; } -void CHyprBar::applyRule(const SWindowRule& r) { - auto arg = r.szRule.substr(r.szRule.find_first_of(' ') + 1); +void CHyprBar::applyRule(const SP& r) { + auto arg = r->szRule.substr(r->szRule.find_first_of(' ') + 1); - if (r.szRule == "plugin:hyprbars:nobar") + if (r->szRule == "plugin:hyprbars:nobar") m_bHidden = true; - else if (r.szRule.starts_with("plugin:hyprbars:bar_color")) + else if (r->szRule.starts_with("plugin:hyprbars:bar_color")) m_bForcedBarColor = CHyprColor(configStringToInt(arg).value_or(0)); - else if (r.szRule.starts_with("plugin:hyprbars:title_color")) + else if (r->szRule.starts_with("plugin:hyprbars:title_color")) m_bForcedTitleColor = CHyprColor(configStringToInt(arg).value_or(0)); } diff --git a/hyprbars/barDeco.hpp b/hyprbars/barDeco.hpp index b63407d..070b1b1 100644 --- a/hyprbars/barDeco.hpp +++ b/hyprbars/barDeco.hpp @@ -35,7 +35,7 @@ class CHyprBar : public IHyprWindowDecoration { PHLWINDOW getOwner(); void updateRules(); - void applyRule(const SWindowRule&); + void applyRule(const SP&); private: SBoxExtents m_seExtents;