From 0f19bd99f8bdd36aaaf5b20bc7fbfe23a5e379b9 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 28 Jul 2022 23:21:35 +0200 Subject: [PATCH] more scaled surface damage fixes --- src/render/Renderer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 9cf0f00a..ed1817f6 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -671,8 +671,10 @@ void CHyprRenderer::damageSurface(wlr_surface* pSurface, double x, double y) { double lx = 0, ly = 0; wlr_output_layout_output_coords(g_pCompositor->m_sWLROutputLayout, m->output, &lx, &ly); - wlr_region_scale(&damageBoxForEach, &damageBox, m->scale); - pixman_region32_translate(&damageBoxForEach, lx + x, ly + y); + pixman_region32_copy(&damageBoxForEach, &damageBox); + pixman_region32_translate(&damageBoxForEach, x, y); + wlr_region_scale(&damageBoxForEach, &damageBoxForEach, m->scale); + pixman_region32_translate(&damageBoxForEach, lx, ly); wlr_output_damage_add(m->damage, &damageBoxForEach); }