Bug 408278

Summary: Session restore does not remember which window belong to which activity
Product: [Plasma] kwin Reporter: Oded Arbel <oded>
Component: activitiesAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.15.90   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Oded Arbel 2019-06-04 08:02:10 UTC
SUMMARY

After logging off from a Plasma X11 session with multiple windows still open and assigned to different activities, with "System Settings" -> "Startup and Shutdown" -> "On Login" set to "Restore previous session", when logging back in, all restored windows are set to be in "all activities" regardless which activities they were originally in.

STEPS TO REPRODUCE
1. Have 2 or more activities started in a Plasma X11 session
2. Open an application that supports session restore (I use Firefox) and set it to be only in one activity (should be by default as new applications are launched into the activity that was active when they were launched).
3. Log off
4. Log in

OBSERVED RESULT

The application windows appear in all activities. Can be verified by switching activities and see the windows remain or by opening the window actions menu and checking that under the "Activities" sub menu, "All Activities" is selected.

EXPECTED RESULT

The application windows should only be shown in the activity they were in before logging off.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
(available in About System)
KDE Plasma Version: 5.16.80
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.2

ADDITIONAL INFORMATION

Kwin install from KCI staging, current package: kwin-x11-4:5.15.90+p19.04+git20190528.2348-0
Comment 1 Oded Arbel 2019-06-04 08:14:19 UTC
And now, after that behavior was annoying me for several weeks (I'm not sure when it started, but it was a long time), and it happened again this morning, and I created this bug report - I tried to reproduce this again with different configurations of applications running (maybe Firefox is causing this somehow) and different log off scenarios (log off, shutdown, restart, DM service restart), to provide more details on the report - and now I can't reproduce the problem *at all*.

So I'm closing this report now. I'll reopen it if I can figure out the scenario in which this problem occurres.