mirror of
https://github.com/hyprwm/Hyprland
synced 2026-05-09 04:18:06 +02:00
Fix complex opaque region shapes
This commit is contained in:
parent
18b40505a9
commit
cfcf260a6b
1 changed files with 7 additions and 2 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue