Bug 449445 - Restarting plasmashell while "Show Desktop" is active will make all windows transparent
Summary: Restarting plasmashell while "Show Desktop" is active will make all windows t...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Unclassified
Component: compositing (show other bugs)
Version: master
Platform: openSUSE RPMs Linux
: VHI normal (vote)
Target Milestone: ---
Assignee: Arjen Hiemstra
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-01 07:41 UTC by Fushan Wen
Modified: 2022-07-31 15:47 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fushan Wen 2022-02-01 07:41:54 UTC
SUMMARY
If I restart plasmashell when "Show Desktop" is on, all windows will become transparent.


STEPS TO REPRODUCE
1. Create a shell script on the desktop, and add "systemctl --user restart plasma-plasmashell" to the file.
2. Make the script file executable.
3. Press "Show Desktop" or Meta+D
4. Run the script

OBSERVED RESULT
All windows become transparent.

EXPECTED RESULT
No window becomes transparent.

SOFTWARE/OS VERSIONS
Information for package kwin5:
------------------------------
Repository     : unstable-kde-frameworks
Name           : kwin5
Version        : 5.24.80git.20220131T175428~5fe9fd13ad-ku.13.1
Arch           : x86_64
Vendor         : obs://build.opensuse.org/KDE:Unstable
Installed Size : 15.6 MiB
Installed      : Yes
Status         : out-of-date (version 5.24.80git.20220128T144116~aebe1ab3a4-ku.11.1 installed)
Source package : kwin5-5.24.80git.20220131T175428~5fe9fd13ad-ku.13.1.src
Summary        : KDE Window Manager
Comment 1 Nate Graham 2022-02-03 19:09:05 UTC
I can reproduce the issue.

The symptoms are identical to another issue I've been seeing where manipulating desktop files while in "Show Desktop" mode sometimes makes all windows become transparent. I strongly suspect they are the same issue, and this just happens to be a 100% reproducible way to trigger it.
Comment 2 Vlad Zahorodnii 2022-02-04 07:17:24 UTC
Lowered from VHI to LO because the show desktop mode is only a temporary state and many users won't hit this problem in real world.
Comment 3 Fushan Wen 2022-02-04 13:10:12 UTC
I guess "Show Desktop" mode is not reset if plasmashell somehow fails to update the status. It can also be a bug in plasmashell.
Comment 4 Nate Graham 2022-02-04 14:25:14 UTC
Real users will *absolutely* hit this in the real world, and we already have a few other bug reports about it scattered around. As I said, killing plasmashell is simply a 100% reproducible way to hit the issue, but I regularly hit it with normal actions such as:

1. Show desktop
2. Delete file on desktop
Comment 5 Fushan Wen 2022-02-04 14:40:09 UTC
Only reproducible on Wayland
Comment 6 Fushan Wen 2022-02-09 15:33:54 UTC
Now reproducible on X11
Comment 7 David Edmundson 2022-04-03 12:52:09 UTC
>, but I regularly hit it with normal actions such as:


That's quite a different bug.

The original bug is kwin not stopping if that process leaves without turning off (solvable with a QDBusServiceWatcher?)

This other bug is kwin not handling the desktop having a dialog child window whilst in show desktop mode. We probably wouldn't want showDesktop to immediately end when this prompts opens
Comment 8 David Redondo 2022-07-14 14:53:05 UTC
HighlightWindow could have a similiar issue,
plasma calls it with a list of windows, empty to reset
Comment 9 Bug Janitor Service 2022-07-15 12:59:20 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2663
Comment 10 Bug Janitor Service 2022-07-25 15:49:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1062
Comment 11 Arjen Hiemstra 2022-07-29 10:12:26 UTC
Git commit bb91c9485560cf13702383f972974409cb47cdfa by Arjen Hiemstra.
Committed on 29/07/2022 at 09:52.
Pushed by ahiemstra into branch 'master'.

Expose Workspace::showingDesktop and a setter as D-Bus api

This allows us to unify the X and Wayland codepaths that currently go
through window-system specific IPC. It also allows us to easily track
who called "setShowingDesktop" and cancel the effect when that client
disappears.

M  +46   -0    src/dbusinterface.cpp
M  +11   -0    src/dbusinterface.h
M  +9    -0    src/org.kde.KWin.xml

https://invent.kde.org/plasma/kwin/commit/bb91c9485560cf13702383f972974409cb47cdfa
Comment 12 Arjen Hiemstra 2022-07-29 12:58:04 UTC
Git commit ac804ff159561b19aed20798f69a58cddf073a3d by Arjen Hiemstra.
Committed on 29/07/2022 at 10:52.
Pushed by ahiemstra into branch 'master'.

ShowDesktop: Use the new DBus API for showing the desktop

This unifies the code paths (underneath KWindowSystem goes through two
separate code paths) and generally makes the code a lot more direct
instead of going through a bunch of layers. Additionally, it allows the
KWin-side of things to check if the caller disappears and quit the "show
desktop" mode if that happens.

M  +2    -0    applets/showdesktop/CMakeLists.txt
A  +14   -0    applets/showdesktop/plugin/org.kde.KWin.xml
M  +14   -4    applets/showdesktop/plugin/showdesktop.cpp
M  +5    -0    applets/showdesktop/plugin/showdesktop.h

https://invent.kde.org/plasma/plasma-desktop/commit/ac804ff159561b19aed20798f69a58cddf073a3d