surface damage fixes

This commit is contained in:
vaxerski 2022-07-28 22:15:56 +02:00
parent 4076a3b6d7
commit 3f62a386bf

View file

@ -666,15 +666,21 @@ void CHyprRenderer::damageSurface(wlr_surface* pSurface, double x, double y) {
pixman_region32_translate(&damageBox, x, y);
pixman_region32_t damageBoxForEach;
pixman_region32_init(&damageBoxForEach);
for (auto& m : g_pCompositor->m_vMonitors) {
double lx = 0, ly = 0;
wlr_output_layout_output_coords(g_pCompositor->m_sWLROutputLayout, m->output, &lx, &ly);
pixman_region32_translate(&damageBox, lx, ly);
wlr_region_scale(&damageBox, &damageBox, m->scale);
wlr_region_scale(&damageBox, &damageBoxForEach, m->scale);
pixman_region32_translate(&damageBoxForEach, lx, ly);
wlr_output_damage_add(m->damage, &damageBox);
pixman_region32_translate(&damageBox, -lx, -ly);
}
pixman_region32_fini(&damageBoxForEach);
static auto *const PLOGDAMAGE = &g_pConfigManager->getConfigValuePtr("debug:log_damage")->intValue;
if (*PLOGDAMAGE)