Bug 308475 - KActivites does not support Session Management
Summary: KActivites does not support Session Management
Status: RESOLVED UPSTREAM
Alias: None
Product: kactivitymanagerd
Classification: Plasma
Component: general (show other bugs)
Version: 4.8.4
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Ivan Čukić
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-16 08:22 UTC by dolgener
Modified: 2012-10-16 12:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dolgener 2012-10-16 08:22:02 UTC
When logout from your KDE desktop, leaving running applications on different activieties, and log on again, session management restores all active windows to that activity which finally had focus.

This causes quite a lot of unnecessary work, in particular as there is no ergonomical way to "throw" windows from one application to another (you have to enter the title bar's context menu and its activities submenu twice and set and clear one checkbox respectively).

Instead, after logon all windows should be brought back to the activity where they run before automatically.

Reproducible: Always

Steps to Reproduce:
1. Use some KDE Activities, e.g. A,B,C, and have Session Management enabled (In systemsettings: "Startup and shutdown | Session Management | On Login: (*)Restore previous session"
2. Have some GUI windows running on different activities, lets call them appA, appB and appC
3. Log off from Activity B
4. Log on again
Actual Results:  
After Logon, you will enter Activity B (which is correct), and appA, appB and appB will all be restored to Activity B (which is annoying).

Expected Results:  
Every application windows should be restored to it's previous activity (appA on A, only appB on B, and appC on C).

A way to quickly "throw" Windows from the current to any other Activity (this might be a taskbar plasmoid with small drop targets for any enabled activity and/or a shortcut to directly move the active window to any activity) would alleviate the situation, too, and would prove additional benefit under normal work!
Comment 1 Ivan Čukić 2012-10-16 08:38:34 UTC
The window /throwing/ is a separate issue, so I'm not going to comment on it here. Please check whether the idea already exists here, and if not, post a feature request.

As for the app-activity restoration, the activity manager does its best concerning that the session protocol was never designed for this kind of usage. Unfortunately, until there is a new protocol that all desktop environments and applications start supporting, this can not be fixed.
Comment 2 dolgener 2012-10-16 12:22:17 UTC
If there was a way to enumerate all windows together with their activity-state (assignment), I'd like to write a (e.g. minutely cron) script capturing the current association into a file, which could be used to restore at least most of the assignments some seconds after logon, as soon as all applications have been started again.

Any hints how to achive this?

(Of course, this is what IMHO activity manager should be able, too... if it fails on a few windows this would be much better than on all!)
Comment 3 Ivan Čukić 2012-10-16 12:47:56 UTC
You can seek the XAtom named _KDE_NET_WM_ACTIVITIES - it will tell you ids of activities a window belongs to.

Mind that this approach you want to take is not going to work:
- one window can be on multiple activities
- one application can have windows spread onto multiple activities
- window ids are not persistent and you can't tell which windows were on which activity even if the application manages to restore them properly
- more reasons :)

If you do manage to write something useful, please post the script back here.