libkwineffects: Make dirty view tracking more robust in SceneEffect
It's possible that a view can request a repaint again in update(). If that happens, we don't want to overwrite the dirty state after update().
This commit is contained in:
parent
b4717ca590
commit
066492ef1d
1 changed files with 2 additions and 2 deletions
|
@ -367,14 +367,14 @@ void QuickSceneEffect::prePaintScreen(ScreenPrePaintData &data, std::chrono::mil
|
||||||
if (effects->waylandDisplay()) {
|
if (effects->waylandDisplay()) {
|
||||||
const auto it = d->views.find(data.screen);
|
const auto it = d->views.find(data.screen);
|
||||||
if (it != d->views.end() && it->second->isDirty()) {
|
if (it != d->views.end() && it->second->isDirty()) {
|
||||||
it->second->update();
|
|
||||||
it->second->resetDirty();
|
it->second->resetDirty();
|
||||||
|
it->second->update();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (const auto &[screen, screenView] : d->views) {
|
for (const auto &[screen, screenView] : d->views) {
|
||||||
if (screenView->isDirty()) {
|
if (screenView->isDirty()) {
|
||||||
screenView->update();
|
|
||||||
screenView->resetDirty();
|
screenView->resetDirty();
|
||||||
|
screenView->update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue