renderer: don't add workspace offset to pinned

This commit is contained in:
Vaxry 2023-08-09 22:15:37 +02:00
parent cbb899740c
commit 126792584f

View file

@ -2021,7 +2021,7 @@ void CHyprRenderer::setOccludedForBackLayers(CRegion& region, CWorkspace* pWorks
continue; continue;
const auto ROUNDING = w->rounding() * PMONITOR->scale; const auto ROUNDING = w->rounding() * PMONITOR->scale;
const Vector2D POS = w->m_vRealPosition.vec() + Vector2D{ROUNDING, ROUNDING} - PMONITOR->vecPosition + pWorkspace->m_vRenderOffset.vec(); const Vector2D POS = w->m_vRealPosition.vec() + Vector2D{ROUNDING, ROUNDING} - PMONITOR->vecPosition + (w->m_bPinned ? Vector2D{} : pWorkspace->m_vRenderOffset.vec());
const Vector2D SIZE = w->m_vRealSize.vec() - Vector2D{ROUNDING * 2, ROUNDING * 2}; const Vector2D SIZE = w->m_vRealSize.vec() - Vector2D{ROUNDING * 2, ROUNDING * 2};
wlr_box box = {POS.x, POS.y, SIZE.x, SIZE.y}; wlr_box box = {POS.x, POS.y, SIZE.x, SIZE.y};