diff options
Diffstat (limited to 'src/render/decorations/CHyprGroupBarDecoration.cpp')
| -rw-r--r-- | src/render/decorations/CHyprGroupBarDecoration.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/render/decorations/CHyprGroupBarDecoration.cpp b/src/render/decorations/CHyprGroupBarDecoration.cpp index c2a65f56..1db7952c 100644 --- a/src/render/decorations/CHyprGroupBarDecoration.cpp +++ b/src/render/decorations/CHyprGroupBarDecoration.cpp @@ -3,6 +3,11 @@ #include <ranges> #include <pango/pangocairo.h> +// shared things to conserve VRAM +static std::deque<std::unique_ptr<CTitleTex>> m_dpTitleTextures; +static CTexture m_tGradientActive; +static CTexture m_tGradientInactive; + CHyprGroupBarDecoration::CHyprGroupBarDecoration(CWindow* pWindow) { m_pWindow = pWindow; } @@ -166,8 +171,11 @@ void CHyprGroupBarDecoration::clearUnusedTextures() { for (auto& tex : m_dpTitleTextures | std::views::reverse) { bool found = false; - for (auto& w : m_dwGroupMembers) { - if (tex->szContent == w->m_szTitle && tex->pWindowOwner == w) { + for (auto& w : g_pCompositor->m_vWindows) { + if (!w->m_sGroupData.pNextWindow) + continue; + + if (tex->szContent == w->m_szTitle && tex->pWindowOwner == w.get()) { found = true; break; } |
