monitor: don't damage twice (#4727)
When scaled, the ring is already fully damaged, no need to add the region damage. Also moved a variable that was being declared way to far for where it is actually used. Co-authored-by: Abilio Costa <abilio.costa@criticaltechworks.com>
This commit is contained in:
parent
fbf5ba87ce
commit
e3e7e1fdda
2 changed files with 3 additions and 5 deletions
|
|
@ -320,9 +320,7 @@ void CMonitor::addDamage(const pixman_region32_t* rg) {
|
|||
if (*PZOOMFACTOR != 1.f && g_pCompositor->getMonitorFromCursor() == this) {
|
||||
wlr_damage_ring_add_whole(&damage);
|
||||
g_pCompositor->scheduleFrameForMonitor(this);
|
||||
}
|
||||
|
||||
if (wlr_damage_ring_add(&damage, rg))
|
||||
} else if (wlr_damage_ring_add(&damage, rg))
|
||||
g_pCompositor->scheduleFrameForMonitor(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue