From bb8b51a3abe750a42907f393bc35da5f5d034a83 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 20 Feb 2024 22:42:54 +0200 Subject: [PATCH] Fix disappearing software cursor in overview and zoom effect The overview and the zoom effect repaint the whole screen every frame. But the problem is that there are cases when there's nothing to repaint. I'm not quite sure why it happens. Maybe overview and other effects should honor the repaint region, but on the other hand, they don't need to because of the fullscreen effect api promises. This change forces overview and zoom effect to use "generic paint" code path in the workspace scene to force infiniteRegion() repaint regions. BUG: 481523 --- src/effect/quickeffect.cpp | 2 ++ src/plugins/zoom/zoom.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/src/effect/quickeffect.cpp b/src/effect/quickeffect.cpp index b78ad0125c..4fa0ab023b 100644 --- a/src/effect/quickeffect.cpp +++ b/src/effect/quickeffect.cpp @@ -366,6 +366,8 @@ void QuickSceneEffect::activateView(QuickSceneView *view) // Screen views are repainted just before kwin performs its compositing cycle to avoid stalling for vblank void QuickSceneEffect::prePaintScreen(ScreenPrePaintData &data, std::chrono::milliseconds presentTime) { + data.mask |= PAINT_SCREEN_TRANSFORMED; + if (effects->waylandDisplay()) { const auto it = d->views.find(data.screen); if (it != d->views.end() && it->second->isDirty()) { diff --git a/src/plugins/zoom/zoom.cpp b/src/plugins/zoom/zoom.cpp index 483e34dd5b..cd6b1f561a 100644 --- a/src/plugins/zoom/zoom.cpp +++ b/src/plugins/zoom/zoom.cpp @@ -244,6 +244,7 @@ void ZoomEffect::reconfigure(ReconfigureFlags) void ZoomEffect::prePaintScreen(ScreenPrePaintData &data, std::chrono::milliseconds presentTime) { + data.mask |= PAINT_SCREEN_TRANSFORMED; if (zoom != target_zoom) { int time = 0; if (lastPresentTime.count()) {