Skip to content

Commit

Permalink
renderer: Fix floating clipbox (#3907)
Browse files Browse the repository at this point in the history
* fix floating decoration clipbox scale

* use vecTransformedSize

* use workspace offset
  • Loading branch information
thejch committed Nov 21, 2023
1 parent 7d1c8d8 commit 572fd55
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/render/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,7 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec*

// if window is floating and we have a slide animation, clip it to its full bb
if (!ignorePosition && pWindow->m_bIsFloating && !pWindow->m_bIsFullscreen && PWORKSPACE->m_vRenderOffset.isBeingAnimated()) {
CRegion rg = pWindow->getFullWindowBoundingBox().translate(-pMonitor->vecPosition).scale(pMonitor->scale);
rg.add(CBox{0, 0, pMonitor->vecSize.x, pMonitor->vecSize.y});
CRegion rg = pWindow->getFullWindowBoundingBox().translate(-pMonitor->vecPosition + PWORKSPACE->m_vRenderOffset.vec()).scale(pMonitor->scale);
g_pHyprOpenGL->m_RenderData.clipBox = rg.getExtents();
}

Expand Down

0 comments on commit 572fd55

Please sign in to comment.