From 5e5d7e2abcd91c83058ba80ec64ec5054cae5bfa Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 16 Mar 2024 14:37:07 +0000 Subject: renderer: fix non-reported sizes window box calculations fixed #5129 --- src/render/Renderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 5c0d3d10..309e5742 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -92,7 +92,7 @@ static void renderSurface(struct wlr_surface* surface, int x, int y, void* data) } } - if (PSURFACE && PWINDOW && PWINDOW->m_vRealSize.goal() > PWINDOW->m_vReportedSize) { + if (PSURFACE && PWINDOW && PWINDOW->m_vRealSize.goal() > PWINDOW->m_vReportedSize && PWINDOW->m_vReportedSize > Vector2D{1, 1}) { Vector2D size = Vector2D{windowBox.w * (PWINDOW->m_vReportedSize.x / PWINDOW->m_vRealSize.value().x), windowBox.h * (PWINDOW->m_vReportedSize.y / PWINDOW->m_vRealSize.value().y)}; Vector2D correct = Vector2D{windowBox.w, windowBox.h} - size; -- cgit v1.2.3