From 45fcd108d10d246030706f795f947371bac44795 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 19 Oct 2023 14:48:55 +0100 Subject: [PATCH] borders-plus-plus: honor 0 rounding --- borders-plus-plus/borderDeco.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/borders-plus-plus/borderDeco.cpp b/borders-plus-plus/borderDeco.cpp index 3126c60..ee64431 100644 --- a/borders-plus-plus/borderDeco.cpp +++ b/borders-plus-plus/borderDeco.cpp @@ -43,8 +43,8 @@ void CBordersPlusPlus::draw(CMonitor* pMonitor, float a, const Vector2D& offset) if (*PBORDERS < 1) return; - auto rounding = m_pWindow->rounding() * pMonitor->scale + *PBORDERSIZE; - const auto ORIGINALROUND = m_pWindow->rounding() * pMonitor->scale + *PBORDERSIZE; + auto rounding = m_pWindow->rounding() == 0 ? 0 : m_pWindow->rounding() * pMonitor->scale + *PBORDERSIZE; + const auto ORIGINALROUND = rounding == 0 ? 0 : m_pWindow->rounding() * pMonitor->scale + *PBORDERSIZE; wlr_box fullBox = {(int)m_vLastWindowPos.x, (int)m_vLastWindowPos.y, (int)m_vLastWindowSize.x, (int)m_vLastWindowSize.y}; fullBox.x -= pMonitor->vecPosition.x; @@ -65,7 +65,7 @@ void CBordersPlusPlus::draw(CMonitor* pMonitor, float a, const Vector2D& offset) const int THISBORDERSIZE = *PSIZES[i] == -1 ? *PBORDERSIZE : *PSIZES[i]; if (i != 0) { - rounding += PREVBORDERSIZE; + rounding += rounding == 0 ? 0 : PREVBORDERSIZE; fullBox.x -= PREVBORDERSIZE; fullBox.y -= PREVBORDERSIZE; fullBox.width += PREVBORDERSIZE * 2;