mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-26 21:49:49 +01:00
surface damage fixes
This commit is contained in:
parent
4076a3b6d7
commit
3f62a386bf
1 changed files with 9 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue