aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/render/Renderer.cpp
diff options
context:
space:
mode:
authordawsers <[email protected]>2024-11-11 14:48:50 +0100
committerGitHub <[email protected]>2024-11-11 13:48:50 +0000
commita551f85b9129eac76a5f295ecfe4fb39f96f435c (patch)
treead1fff1f83af035c3fa9f9b27cd4789aadf53baf /src/render/Renderer.cpp
parent07052a515bea46e8b01d3ca5b2c284c272c5ed34 (diff)
downloadHyprland-a551f85b9129eac76a5f295ecfe4fb39f96f435c.tar.gz
Hyprland-a551f85b9129eac76a5f295ecfe4fb39f96f435c.zip
renderer: scaled surfaces could have zero area (#8423)
Diffstat (limited to 'src/render/Renderer.cpp')
-rw-r--r--src/render/Renderer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 469acda9..d98e32a9 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -222,6 +222,11 @@ static void renderSurface(SP<CWLSurfaceResource> surface, int x, int y, void* da
windowBox.height = RDATA->h - y;
}
+ const auto PROJSIZEUNSCALED = windowBox.size();
+
+ windowBox.scale(RDATA->pMonitor->scale);
+ windowBox.round();
+
if (windowBox.width <= 1 || windowBox.height <= 1) {
if (!g_pHyprRenderer->m_bBlockSurfaceFeedback) {
Debug::log(TRACE, "presentFeedback for invisible surface");
@@ -231,11 +236,6 @@ static void renderSurface(SP<CWLSurfaceResource> surface, int x, int y, void* da
return; // invisible
}
- const auto PROJSIZEUNSCALED = windowBox.size();
-
- windowBox.scale(RDATA->pMonitor->scale);
- windowBox.round();
-
const bool MISALIGNEDFSV1 = std::floor(RDATA->pMonitor->scale) != RDATA->pMonitor->scale /* Fractional */ && surface->current.scale == 1 /* fs protocol */ &&
windowBox.size() != surface->current.bufferSize /* misaligned */ && DELTALESSTHAN(windowBox.width, surface->current.bufferSize.x, 3) &&
DELTALESSTHAN(windowBox.height, surface->current.bufferSize.y, 3) /* off by one-or-two */ &&