From 7d989f2cf0ef3d14aa2cc3a03bc05ddf2265b6d1 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 7 Apr 2024 22:25:34 +0100 Subject: [PATCH] damageSurface: don't correct smallVec twice --- src/render/Renderer.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index bce08264..020350df 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1709,19 +1709,13 @@ void CHyprRenderer::damageSurface(wlr_surface* pSurface, double x, double y, dou if (g_pCompositor->m_bUnsafeState) return; - auto* const PSURFACE = CWLSurface::surfaceFromWlr(pSurface); - if (PSURFACE && PSURFACE->small()) { - const auto CORRECTION = PSURFACE->correctSmallVec(); - x += CORRECTION.x; - y += CORRECTION.y; - } - const auto WLSURF = CWLSurface::surfaceFromWlr(pSurface); CRegion damageBox = WLSURF ? WLSURF->logicalDamage() : CRegion{}; if (!WLSURF) { Debug::log(ERR, "BUG THIS: No CWLSurface for surface in damageSurface!!!"); wlr_surface_get_effective_damage(pSurface, damageBox.pixman()); } + if (scale != 1.0) damageBox.scale(scale);