Commit 1f6d9d48 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

effects/zoom: Schedule a fullscreen repaint if stopped zooming

On Wayland, screens are repainted independent of each other. If zooming
animation stops on one screen, other screens may still be stuck in the
zoomed state and therefore result in potential flickering. Issue a full
screen repaint when zooming stops to ensure that other screens are
repainted with "unscaled" contents.

BUG: 454407
Part-of: <!2472>
parent f3b291bc
Pipeline #181363 passed with stage
in 12 minutes and 7 seconds
......@@ -429,11 +429,15 @@ void ZoomEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData &d
void ZoomEffect::postPaintScreen()
{
if (zoom != target_zoom) {
effects->addRepaintFull();
} else {
if (zoom == target_zoom) {
lastPresentTime = std::chrono::milliseconds::zero();
}
if (zoom == 1.0 || zoom != target_zoom) {
// Either animation is running or the zoom effect has stopped.
effects->addRepaintFull();
}
effects->postPaintScreen();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment