Bug 417114

Summary: Removed widget re-appears back after relogin if I do logout while "Undo" notification is visible
Product: [Plasma] plasmashell Reporter: Patrick Silva <bugseforuns>
Component: generalAssignee: David Edmundson <kde>
Severity: normal CC: kde, kishore96, machitgarha, nate, plasma-bugs, vasua.ukraine
Priority: HI Keywords: usability
Version: 5.22.90   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.102

Description Patrick Silva 2020-02-03 18:44:09 UTC
I can't reproduce this behavior on X11.

1. start Wayland session
2. right click on desktop, click on "Add widgets..."
3. drag a widget and drop it on desktop (I used Analog Clock during my test)
4. close the widget explorer
5. right click on the widget added to desktop, click on "Remove <widget>"
(plasma shows a notification with a button to undo removing)
6. while the notification is still visible, do logout
7 start Wayland session again

widget removed in the steps above is present on your desktop again

removed widget does not back after relogin

Operating System: Arch Linux 
KDE Plasma Version: 5.17.90
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.1
Comment 1 Patrick Silva 2020-02-03 19:48:57 UTC
The same happens with a widget removed from Plasma panel.
Not reproducible if I close the "Undo" notification before logout.
Comment 2 David Edmundson 2020-06-13 23:32:03 UTC
I'm guessing the reason it seems wayland specific is because on X11 plasmashell gets a slightly nicer signal to quit in which it saves it's config.

I do have a pending plan for that
Comment 3 Nate Graham 2021-03-11 19:07:49 UTC
Can reproduce on X11 too. I think this is because the widget is still technically there while the unto notification is visible, and is only destroyed when the notification times out or is manually dismissed.
Comment 4 Nate Graham 2022-08-10 17:54:49 UTC
*** Bug 457588 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2022-10-25 16:47:08 UTC
*** Bug 460872 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2022-12-06 15:23:41 UTC
Git commit 1bd3d63ac5b2c57d91c762c63ef87d4333485b58 by Nate Graham, on behalf of Marco Martin.
Committed on 06/12/2022 at 15:23.
Pushed by ngraham into branch 'master'.

Mark transient applets in config

When deleting an applet it doesn't really delete it but sets it invisible and marks it
as "transient" to be able to undo the deletion.

If plasma is killed or crashes, the information that it was deleted is lost and Plasma
recreates it on the next launch. This commit saves the "transient" property in the
config and on launch actually cleans the config and doesn't load those.

Not actually deleting the config groups on first delete, as it would cause config loss
on undo.
FIXED-IN: 5.102

M  +4    -0    src/plasma/containment.cpp
M  +3    -0    src/plasma/corona.cpp
M  +6    -0    src/plasma/private/applet_p.cpp