Fix complex opaque region shapes

This commit is contained in:
jmanc3 2026-01-29 11:41:47 -06:00
parent 18b40505a9
commit cfcf260a6b

View file

@ -58,8 +58,13 @@ void CRenderPass::simplify() {
// scale and rounding is very particular so we have to use CBoxes scale and round functions
if (opaque.getRects().size() == 1)
opaque = opaque.getExtents().scale(g_pHyprOpenGL->m_renderData.pMonitor->m_scale).round();
else
opaque.scale(g_pHyprOpenGL->m_renderData.pMonitor->m_scale);
else {
CRegion scaledRegion;
opaque.forEachRect([&scaledRegion] (const auto& RECT) {
scaledRegion.add(CBox(RECT.x1, RECT.y1, RECT.x2 - RECT.x1, RECT.y2 - RECT.y1).scale(g_pHyprOpenGL->m_renderData.pMonitor->m_scale).round());
});
opaque = scaledRegion;
}
// if this intersects the liveBlur region, allow live blur to operate correctly.
// do not occlude a border near it.