summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
Diffstat (limited to 'src/render')
-rw-r--r--src/render/decorations/CHyprGroupBarDecoration.cpp12
-rw-r--r--src/render/decorations/CHyprGroupBarDecoration.hpp21
2 files changed, 19 insertions, 14 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;
}
diff --git a/src/render/decorations/CHyprGroupBarDecoration.hpp b/src/render/decorations/CHyprGroupBarDecoration.hpp
index 3a0fec27..d8b0f46a 100644
--- a/src/render/decorations/CHyprGroupBarDecoration.hpp
+++ b/src/render/decorations/CHyprGroupBarDecoration.hpp
@@ -33,21 +33,18 @@ class CHyprGroupBarDecoration : public IHyprWindowDecoration {
virtual SWindowDecorationExtents getWindowDecorationReservedArea();
private:
- SWindowDecorationExtents m_seExtents;
+ SWindowDecorationExtents m_seExtents;
- CWindow* m_pWindow = nullptr;
+ CWindow* m_pWindow = nullptr;
- Vector2D m_vLastWindowPos;
- Vector2D m_vLastWindowSize;
+ Vector2D m_vLastWindowPos;
+ Vector2D m_vLastWindowSize;
- std::deque<CWindow*> m_dwGroupMembers;
- std::deque<std::unique_ptr<CTitleTex>> m_dpTitleTextures;
+ std::deque<CWindow*> m_dwGroupMembers;
- CTitleTex* textureFromTitle(const std::string&);
- void clearUnusedTextures();
- void invalidateTextures();
+ CTitleTex* textureFromTitle(const std::string&);
+ void clearUnusedTextures();
+ void invalidateTextures();
- void refreshGradients();
- CTexture m_tGradientActive;
- CTexture m_tGradientInactive;
+ void refreshGradients();
}; \ No newline at end of file