diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 437e2b5e..f7b42611 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -124,8 +124,8 @@ void CConfigManager::setDefaultVars() { ((CGradientValueData*)configValues["group:col.border_inactive"].data.get())->reset(0x66777700); ((CGradientValueData*)configValues["group:col.border_locked_active"].data.get())->reset(0x66ff5500); ((CGradientValueData*)configValues["group:col.border_locked_inactive"].data.get())->reset(0x66775500); - configValues["group:insert_after_current"].intValue = 1; - configValues["group:focus_removed_window"].intValue = 1; + configValues["group:insert_after_current"].intValue = 1; + configValues["group:focus_removed_window"].intValue = 1; configValues["group:groupbar:enabled"].intValue = 1; configValues["group:groupbar:font"].strValue = "Sans"; @@ -1653,7 +1653,7 @@ void CConfigManager::loadConfigLoadVars() { w->updateSpecialRenderData(); for (auto& wd : w->m_dWindowDecorations) - wd->forceReload(w.get()); + wd->forceReload(); g_pLayoutManager->getCurrentLayout()->recalculateWindow(w.get()); } diff --git a/src/render/decorations/CHyprDropShadowDecoration.cpp b/src/render/decorations/CHyprDropShadowDecoration.cpp index 50a60c39..1c2d33bc 100644 --- a/src/render/decorations/CHyprDropShadowDecoration.cpp +++ b/src/render/decorations/CHyprDropShadowDecoration.cpp @@ -97,7 +97,6 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a, const Vector2D fullBox.width = NEWSIZE.x; fullBox.height = NEWSIZE.y; - // either was broken or it is now if (PSHADOWOFFSET->x < 0) { fullBox.x += PSHADOWOFFSET->x; } else if (PSHADOWOFFSET->x > 0) { diff --git a/src/render/decorations/CHyprGroupBarDecoration.cpp b/src/render/decorations/CHyprGroupBarDecoration.cpp index 100202b3..c002a4a2 100644 --- a/src/render/decorations/CHyprGroupBarDecoration.cpp +++ b/src/render/decorations/CHyprGroupBarDecoration.cpp @@ -11,7 +11,7 @@ static CTexture m_tGradientLockedInactive; CHyprGroupBarDecoration::CHyprGroupBarDecoration(CWindow* pWindow) : IHyprWindowDecoration(pWindow) { m_pWindow = pWindow; - forceReload(m_pWindow); + loadConfig(); } CHyprGroupBarDecoration::~CHyprGroupBarDecoration() {} @@ -345,7 +345,7 @@ void CHyprGroupBarDecoration::refreshGradients() { renderGradientTo(m_tGradientLockedInactive, ((CGradientValueData*)PGROUPCOLINACTIVELOCKED->get())->m_vColors[0]); } -void CHyprGroupBarDecoration::forceReload(CWindow* pWindow) { +void CHyprGroupBarDecoration::loadConfig() { static auto* const PENABLED = &g_pConfigManager->getConfigValuePtr("group:groupbar:enabled")->intValue; static auto* const PMODE = &g_pConfigManager->getConfigValuePtr("group:groupbar:mode")->intValue; static auto* const PHEIGHT = &g_pConfigManager->getConfigValuePtr("group:groupbar:height")->intValue; @@ -369,7 +369,10 @@ void CHyprGroupBarDecoration::forceReload(CWindow* pWindow) { m_iBarHeight = *PMODE != 1 ? *PHEIGHT : BAR_INDICATOR_HEIGHT; m_iGradientHeight = *PMODE == 1 ? *PHEIGHT : 0; +} +void CHyprGroupBarDecoration::forceReload() { + loadConfig(); refreshGradients(); } diff --git a/src/render/decorations/CHyprGroupBarDecoration.hpp b/src/render/decorations/CHyprGroupBarDecoration.hpp index 7132cf3f..923bd973 100644 --- a/src/render/decorations/CHyprGroupBarDecoration.hpp +++ b/src/render/decorations/CHyprGroupBarDecoration.hpp @@ -33,7 +33,7 @@ class CHyprGroupBarDecoration : public IHyprWindowDecoration { virtual CRegion getWindowDecorationRegion(); - virtual void forceReload(CWindow*); + virtual void forceReload(); virtual bool allowsInput(); @@ -67,6 +67,7 @@ class CHyprGroupBarDecoration : public IHyprWindowDecoration { void invalidateTextures(); void refreshGradients(); + void loadConfig(); struct STitleTexs { // STitleTexs* overriden = nullptr; // TODO: make shit shared in-group to decrease VRAM usage. diff --git a/src/render/decorations/IHyprWindowDecoration.cpp b/src/render/decorations/IHyprWindowDecoration.cpp index 6cb02a4f..84d4ed42 100644 --- a/src/render/decorations/IHyprWindowDecoration.cpp +++ b/src/render/decorations/IHyprWindowDecoration.cpp @@ -24,8 +24,8 @@ CRegion IHyprWindowDecoration::getWindowDecorationRegion() { m_pWindow->m_vRealSize.vec().y + 2 * BORDERSIZE)); } -void IHyprWindowDecoration::forceReload(CWindow* pWindow) { - updateWindow(pWindow); +void IHyprWindowDecoration::forceReload() { + updateWindow(m_pWindow); } bool IHyprWindowDecoration::allowsInput() { diff --git a/src/render/decorations/IHyprWindowDecoration.hpp b/src/render/decorations/IHyprWindowDecoration.hpp index b43be6b5..63d54ffe 100644 --- a/src/render/decorations/IHyprWindowDecoration.hpp +++ b/src/render/decorations/IHyprWindowDecoration.hpp @@ -37,7 +37,7 @@ class IHyprWindowDecoration { virtual void damageEntire() = 0; - virtual void forceReload(CWindow*); + virtual void forceReload(); virtual CRegion getWindowDecorationRegion();