groupbar start after end of rounding (breaks mouse)

modified:   src/render/decorations/CHyprGroupBarDecoration.cpp

Signed-off-by: MightyPlaza <123664421+MightyPlaza@users.noreply.github.com>
This commit is contained in:
MightyPlaza 2023-09-02 19:57:00 +01:00
parent 3c16da33ab
commit 0120273992
No known key found for this signature in database
GPG key ID: 284C27FD27A6DC0D

View file

@ -102,15 +102,20 @@ void CHyprGroupBarDecoration::draw(CMonitor* pMonitor, float a, const Vector2D&
const auto* const PCOLACTIVE = GROUPLOCKED ? PGROUPCOLACTIVELOCKED : PGROUPCOLACTIVE;
const auto* const PCOLINACTIVE = GROUPLOCKED ? PGROUPCOLINACTIVELOCKED : PGROUPCOLINACTIVE;
// TODO: fix mouse event with rounding
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(m_pWindow->m_iWorkspaceID);
const int ROUNDING =
(m_pWindow->m_bIsFullscreen && PWORKSPACE->m_efFullscreenMode == FULLSCREEN_FULL) || (!m_pWindow->m_sSpecialRenderData.rounding) ? 0 : m_pWindow->rounding();
const int PAD = 2; //2px
const int BARW = (m_vLastWindowSize.x - PAD * (barsToDraw - 1)) / barsToDraw;
const int BARW = (m_vLastWindowSize.x - 2 * ROUNDING - PAD * (barsToDraw - 1)) / barsToDraw;
// TODO: check for invalid config
if (BARW <= 0)
return;
// Bottom left of groupbar
Vector2D pos = Vector2D(m_vLastWindowPos.x - pMonitor->vecPosition.x + offset.x,
Vector2D pos = Vector2D(m_vLastWindowPos.x - pMonitor->vecPosition.x + offset.x + ROUNDING,
m_vLastWindowPos.y - pMonitor->vecPosition.y + offset.y +
(*PLOCATIONTOP ? -BORDERSIZE : m_vLastWindowSize.y + BORDERSIZE + getBarHeight() + BAR_INTERNAL_PADDING));