Bug 454280

Summary: Screen flickers when Show Desktop is invoked while all windows are minimized
Product: [Plasma] kwin Reporter: Patrick Silva <bugseforuns>
Component: effects-variousAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kde, nate
Priority: NOR Keywords: regression
Version First Reported In: 5.24.90   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Patrick Silva 2022-05-23 15:41:37 UTC
STEPS TO REPRODUCE
1. use Wayland - not tested on X11
2. set two or more virtual desktops in Virtual Desktops KCM
3. open the settings of Pager widget in Plasma panel
4. select 'Shows the desktop' under 'Selecting current virtual desktop:' and click on 'OK"
5. minimize or close all windows
6. click on the current virtual desktop in Pager widget

OBSERVED RESULT
the screen flickers

EXPECTED RESULT
nothing happens

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.25.80
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.4
Graphics Platform: Wayland
Comment 1 Nate Graham 2022-05-24 18:15:35 UTC
Can reproduce. Also can reproduce if I minimize all windows and activate Shoew Desktop with Meta+D. Seems to be an issue in the Show Desktop effect; moving to KWin.
Comment 2 Vlad Zahorodnii 2022-05-25 06:51:40 UTC
Can't reproduce if I press Meta+D. But I can reproduce if I first click the pager to show the desktop, and then press Meta+D afterwards.
Comment 3 Bug Janitor Service 2022-05-25 07:15:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2462
Comment 4 Bug Janitor Service 2022-05-25 08:06:22 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2463
Comment 5 Vlad Zahorodnii 2022-05-27 08:00:38 UTC
Git commit 207c59002b7f911c9fd81f5ca62499d05bcb9be8 by Vlad Zahorodnii, on behalf of Marco Martin.
Committed on 27/05/2022 at 08:00.
Pushed by vladz into branch 'master'.

Properly reset offToCornerId and apertureCorner when the effect closes

When the effect closes, all the extra data attached to the window
(offToCornerId and apertureCorner properties) are not valid anymore
and need to be reset right after the animation end.
also manage the two edge cases where a window either appeared or
got minimized while the effect was running to either show it or not

M  +36   -18   src/effects/windowaperture/package/contents/code/main.js

https://invent.kde.org/plasma/kwin/commit/207c59002b7f911c9fd81f5ca62499d05bcb9be8
Comment 6 Vlad Zahorodnii 2022-05-27 08:16:42 UTC
Git commit 67c185110f5ffb75fea50c1e23b5c8e3bc512539 by Vlad Zahorodnii, on behalf of Marco Martin.
Committed on 27/05/2022 at 08:16.
Pushed by vladz into branch 'Plasma/5.25'.

Properly reset offToCornerId and apertureCorner when the effect closes

When the effect closes, all the extra data attached to the window
(offToCornerId and apertureCorner properties) are not valid anymore
and need to be reset right after the animation end.
also manage the two edge cases where a window either appeared or
got minimized while the effect was running to either show it or not


(cherry picked from commit 207c59002b7f911c9fd81f5ca62499d05bcb9be8)

M  +36   -18   src/effects/windowaperture/package/contents/code/main.js

https://invent.kde.org/plasma/kwin/commit/67c185110f5ffb75fea50c1e23b5c8e3bc512539