diff --git a/src/Window.cpp b/src/Window.cpp index 5be10f9f..b19098e8 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -930,10 +930,14 @@ int CWindow::getRealRounding() { if (!m_sSpecialRenderData.rounding) return 0; - if (m_sAdditionalConfigData.rounding.toUnderlying() != -1) - return m_sAdditionalConfigData.rounding.toUnderlying(); + int rounding; - return g_pConfigManager->getConfigValuePtr("decoration:rounding")->intValue; + if (m_sAdditionalConfigData.rounding.toUnderlying() != -1) + rounding = m_sAdditionalConfigData.rounding.toUnderlying(); + else + rounding = g_pConfigManager->getConfigValuePtr("decoration:rounding")->intValue; + + return std::min(rounding, (int)std::min(m_vRealSize.vec().x, m_vRealSize.vec().y) / 2); } int CWindow::getRealBorderSize() { diff --git a/src/render/decorations/CHyprGroupBarDecoration.cpp b/src/render/decorations/CHyprGroupBarDecoration.cpp index 4cb78b57..f44a5133 100644 --- a/src/render/decorations/CHyprGroupBarDecoration.cpp +++ b/src/render/decorations/CHyprGroupBarDecoration.cpp @@ -107,9 +107,6 @@ void CHyprGroupBarDecoration::draw(CMonitor* pMonitor, float a, const Vector2D& float currentOffset = BAR_HORIZONTAL_PADDING; - if (m_fBarWidth <= 0) - return; - // Bottom left of groupbar Vector2D pos = Vector2D( m_vLastWindowPos.x - pMonitor->vecPosition.x + offset.x + ROUNDING, @@ -184,13 +181,12 @@ void CHyprGroupBarDecoration::draw(CMonitor* pMonitor, float a, const Vector2D& g_pHyprOpenGL->renderRect(&barBox, color, std::sqrt(m_iBarHeight) / 2); // render title if necessary - if (*PRENDERTITLES) { + if (*PRENDERTITLES && textBox.width > 0 && textBox.height > 0) { CTitleTex* pTitleTex = textureFromTitle(m_dwGroupMembers[i]->m_szTitle); if (!pTitleTex) pTitleTex = m_sTitleTexs.titleTexs.emplace_back(std::make_unique(m_dwGroupMembers[i], Vector2D(textBox.width, textBox.height))).get(); - if (textBox.width > 0 && textBox.height > 0) - g_pHyprOpenGL->renderTexture(pTitleTex->tex, &textBox, 1.f); + g_pHyprOpenGL->renderTexture(pTitleTex->tex, &textBox, 1.f); } if (gradBox.width > 0 && gradBox.height > 0) {