From 63450e70f2e1d74964e0121e0c865b1d48a2cae3 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 14 May 2023 13:39:38 +0100 Subject: [PATCH] hyprbars: gen text tex if null --- hyprbars/barDeco.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hyprbars/barDeco.cpp b/hyprbars/barDeco.cpp index bdf3a24..a9fd662 100644 --- a/hyprbars/barDeco.cpp +++ b/hyprbars/barDeco.cpp @@ -251,7 +251,7 @@ void CHyprBar::draw(CMonitor* pMonitor, float a, const Vector2D& offset) { const auto BARBUF = Vector2D{(int)m_vLastWindowSize.x + 2 * *PBORDERSIZE, *PHEIGHT} * pMonitor->scale; wlr_box titleBarBox = {(int)m_vLastWindowPos.x - *PBORDERSIZE - pMonitor->vecPosition.x, (int)m_vLastWindowPos.y - *PBORDERSIZE - *PHEIGHT - pMonitor->vecPosition.y, - (int)m_vLastWindowSize.x + 2 * *PBORDERSIZE, *PHEIGHT + *PROUNDING * 3 /* to fill the bottom cuz we can't disable rounding there */}; + (int)m_vLastWindowSize.x + 2 * *PBORDERSIZE, *PHEIGHT + *PROUNDING * 3 /* to fill the bottom cuz we can't disable rounding there */}; titleBarBox.x += offset.x; titleBarBox.y += offset.y; @@ -283,7 +283,7 @@ void CHyprBar::draw(CMonitor* pMonitor, float a, const Vector2D& offset) { g_pHyprOpenGL->renderRect(&titleBarBox, color, *PROUNDING); // render title - if (m_szLastTitle != m_pWindow->m_szTitle || m_bWindowSizeChanged) { + if (m_szLastTitle != m_pWindow->m_szTitle || m_bWindowSizeChanged || m_tTextTex.m_iTexID == 0) { m_szLastTitle = m_pWindow->m_szTitle; renderBarTitle(BARBUF); }