Bug 380335

Summary: Problems closing activities when applications ask for confirmation before closing
Product: [Plasma] plasmashell Reporter: Louis Moureaux <m_louis30>
Component: Activities in generalAssignee: Ivan Čukić <ivan.cukic>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: ivan.cukic, nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.27.0   
Target Milestone: 1.0   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Louis Moureaux 2017-05-29 23:25:18 UTC
Let's say you have an activity with some file open in Kate. When closing it while a document isn't saved to disk, Kate will ask for confirmation (do you want to save your changes before closing? dialog). The confirmation dialog prevents the activity from closing, which is fine. 

However, the activity manager seems to think the activity was closed correctly:
* The current activity gets changed
* When switching back to the activity, all open applications are started a second time

The Plasma UI displays the "half-closed" activity as running.

Notice that in the confirmation dialog, the user can choose *not to* close Kate. I don't know how activities could behave in this case.
Comment 1 Justin Zobel 2022-11-06 09:24:47 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 2 Louis Moureaux 2022-11-16 14:17:21 UTC
Even though the behavior has changed, this is still not handled correctly. Nowadays, the confirmation dialog isn't shown to the user and the app (Kate in the original example) asking for confirmation keeps running. I expect to see the confirmation dialog and only stop the activity if I confirm.

I suspect the running app will be killed on logout and the unsaved data will be lost, but I didn't dare to try.
Comment 3 Nate Graham 2025-05-20 18:12:23 UTC
The feature to stop activities  is being removed for Plasma 6.5, so this issue won't be encountered anymore.
Comment 4 Louis Moureaux 2025-05-20 20:45:24 UTC
Great to see some movement on the activities front, thanks you for this! I'm no longer using them since virtual desktops have become enough with multiscreen and increasing RAM. I was thus no longer affected by this issue.
Comment 5 Nate Graham 2025-05-20 20:48:43 UTC
There is indeed a bit of movement; see https://community.kde.org/Sprints/Plasma/2025/Topics/Activities.