From c6233a790fed3d9a3100e16a73143700846928a2 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 21 Oct 2023 14:20:06 +0100 Subject: [PATCH] renderer: avoid drawing invisibly small surfaces in renderSurface --- src/render/Renderer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 255bdf33..73f289c2 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -61,6 +61,9 @@ void renderSurface(struct wlr_surface* surface, int x, int y, void* data) { windowBox.height = RDATA->h - y; } + if (windowBox.width <= 1 || windowBox.height <= 1) + return; // invisible + g_pHyprRenderer->calculateUVForSurface(RDATA->pWindow, surface, RDATA->squishOversized); scaleBox(&windowBox, RDATA->pMonitor->scale);