fixes to surface damaging on scaled 3

This commit is contained in:
vaxerski 2022-07-28 22:41:59 +02:00
parent 7a2f296c93
commit f0cd784f79

View file

@ -664,8 +664,6 @@ void CHyprRenderer::damageSurface(wlr_surface* pSurface, double x, double y) {
return;
}
pixman_region32_translate(&damageBox, x, y);
pixman_region32_t damageBoxForEach;
pixman_region32_init(&damageBoxForEach);
@ -674,7 +672,7 @@ void CHyprRenderer::damageSurface(wlr_surface* pSurface, double x, double y) {
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, ly);
pixman_region32_translate(&damageBoxForEach, lx + x, ly + y);
wlr_output_damage_add(m->damage, &damageBoxForEach);
}