aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-03-16 14:37:07 +0000
committerVaxry <[email protected]>2024-03-16 14:37:07 +0000
commit5e5d7e2abcd91c83058ba80ec64ec5054cae5bfa (patch)
tree8b7bd5ee5dec04133d7288e0a2ddaeddca9e76ad
parent19c90048d65a5660384d2fb865926a366696d6be (diff)
downloadHyprland-5e5d7e2abcd91c83058ba80ec64ec5054cae5bfa.tar.gz
Hyprland-5e5d7e2abcd91c83058ba80ec64ec5054cae5bfa.zip
renderer: fix non-reported sizes window box calculations
fixed #5129
-rw-r--r--src/render/Renderer.cpp2
1 files changed, 1 insertions, 1 deletions
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;