Bug 285055 - Define application which are used within all activities, always
Summary: Define application which are used within all activities, always
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: activities (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL: http://git.reviewboard.kde.org/r/104972/
Keywords:
: 251270 271925 275622 300878 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-26 23:43 UTC by Kevin Bader
Modified: 2012-05-30 16:21 UTC (History)
15 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.0
Sentry Crash Report:
mgraesslin: ReviewRequest+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Bader 2011-10-26 23:43:01 UTC
Version:           unspecified (using KDE 4.7.2) 
OS:                Linux

Some programs just belong to every activity. An example from myself: I'm a student and use one activity for each course I take. Programs that I use on all these activities frequently are Firefox, Kontact, Clementine, KTorrent or Basket. I'd like them to be visible in every activity. And I really don't want the activity to get changed automatically just because I choose another song (but this is another issue: #285053).

In short: Please provide the means to define selected applications as always belonging to every activity (or to a range of activities, depends on how well you can design the user interface for that).

Please note that I do know about the "Activities -> All Activities" switch in the titlebar's context menu of an application, but this option has two drawbacks:
* it's not persistent
* it does not affect currently halted activities or future activities


Reproducible: Always

Steps to Reproduce:
open firefox in activity "A". switch to activity "B".

Actual Results:  
you want to browse. you _could_ open firefox a second time, but after restarts you end up having all firefox windows in one activity anyway.

Expected Results:  
when firefox is defined as being visible on all desktops, always, you can surf the web although you are working on something else now (in a different activity).
Comment 1 Chani 2011-10-27 03:02:34 UTC
another thing I haven't run into, because I leave such apps running all the time. :) also, you're wrong on point 2, "all activities" really means "all", no matter how many you add, stop or start.

the persistency comment is somewhat valid, though. right now I've been leaving kmail on one activity because of a bug that makes me restart it every few days (yes, I ought to upgrade).

Does anyone have an elegant solution to this? rrix got halfway through adding activity support to the "special window settings" dialog, but I think the code was lost in a disk failure. Besides, that dialog is kinda scary; it would be nice to have an easier way to apply such things to windows & apps.
Comment 2 Chani 2011-10-27 03:07:42 UTC
CC'd kwin because this is likely to end up in their code.
Comment 3 Kevin Bader 2011-10-27 09:36:39 UTC
(In reply to comment #1)
> also, you're wrong on point 2, "all activities" really means "all", no
> matter how many you add, stop or start.

Yes, you're right, I'm sorry.

> the persistency comment is somewhat valid, though. right now I've been leaving
> kmail on one activity because of a bug that makes me restart it every few days
> (yes, I ought to upgrade).

My workflow looks like this: every time I start my computer, I start Kontact, Firefox, Skype and Clementine and set them to display on all activities, one by one. I'd be so happy if I wouldn't have to do that :)
Comment 4 Chani 2011-10-27 19:03:58 UTC
why don't you just leave them running when you log out?

or have you set it to not restore your windows when you log in? there are other ways to make applications start automatically (I could have sworn skype had its own option for it)...

but, those other ways might not end up on the right activity (I totally forgot to test that!) so please tell me what happens if you try it :)
Comment 5 Thomas Lübking 2011-10-27 20:06:10 UTC
(In reply to comment #1)
> Does anyone have an elegant solution to this?
-> kcmshell4 kwinrules, there's already one for the VD (what means that using one activity per VD will likely allow Kevin what he wants to do, but i don't know for sure)
Comment 6 Kevin Bader 2011-10-27 20:41:28 UTC
(In reply to comment #4)
> why don't you just leave them running when you log out?
> 
> or have you set it to not restore your windows when you log in? there are other
> ways to make applications start automatically (I could have sworn skype had its
> own option for it)...

The problem is that I don't want applications like skype to start always when I log in. But when I do run them, I always want them visible on every activity :)

> but, those other ways might not end up on the right activity (I totally forgot
> to test that!) so please tell me what happens if you try it :)

so here's what happened: inconsistency. Firefox is still assigned to all activities after restart, but every application running in system tray (like Kontact or Clementine) is assigned to the current activity only. I've not tried if the system remembers in which activity a certain application was (I think it does) but it certainly does not remember which window of an application was where: multiple firefox windows in different activities end up being in the activity you had open when you shutdown your computer.

(In reply to comment #5)
> -> kcmshell4 kwinrules, there's already one for the VD (what means that using
one activity per VD will likely allow Kevin what he wants to do, but i don't
know for sure)

Will activities be included in the kwinrules dialog? As of 4.7.2 it isn't. Using multiple desktops instead of activities is not what the activity concept is all about and it prevents me from having multiple desktops per activity (maybe I misunderstood you).
Comment 7 Thomas Lübking 2011-10-27 21:40:43 UTC
(In reply to comment #6)
> Will activities be included in the kwinrules dialog?
Not as of now, but Chani asked. I know virtually nothing about activities.
Comment 8 Chani 2011-10-28 00:13:31 UTC
thomas: I can confirm what kevin said: vds are completely separate from activities, we need a separate addition to kwin rules (rrix' code I mentioned)


kevin: firefox is its own set of problems, it hits lots of corner cases in its attempts to be smart. :P it's going to need some patching to make its smartness activity-friendly, I think.

as for skype and the others; fair enough. the kwinrules thing would resolve that :) (although I'm still kinda hoping someone will invent a non-scary alternative to that dialog)
Comment 9 Marko Knöbl 2012-02-03 15:21:57 UTC
I have the opposite issue with "Apper". When I launch it it appears on all activities by default. So I guess there must be some way to configure this. I have reported my problem as bug #293215.
Comment 10 Mikhail Krasilnikov 2012-02-06 09:47:28 UTC
(In reply to comment #9)
> I have the opposite issue with "Apper". When I launch it it appears on all
> activities by default.

Yea, this is annoying.
Comment 11 Martin Flöser 2012-03-13 21:44:46 UTC
*** Bug 275622 has been marked as a duplicate of this bug. ***
Comment 12 Martin Flöser 2012-03-13 21:47:13 UTC
*** Bug 271925 has been marked as a duplicate of this bug. ***
Comment 13 Thomas Lübking 2012-03-13 22:02:26 UTC
*** Bug 274931 has been marked as a duplicate of this bug. ***
Comment 14 Thomas Lübking 2012-03-13 22:03:42 UTC
note to self: when fixing please ensure to fix bug #274931, ie. remove implicit activity stickiness of borderless clients
Comment 15 Thomas Lübking 2012-03-14 17:13:29 UTC
*** Bug 251270 has been marked as a duplicate of this bug. ***
Comment 16 meyerm 2012-04-12 13:05:24 UTC
Handling Activities just like the Desktops would be a good approach (from the UI perspective). At least that's where I looked for such a setting first. Please do not introduce any "intelligence" like always handle clementine differently than konqueror.

My use case are Kopete chat windows. They are shown on every desktop due to a KWin-rule I created (KWin is awesome!). Adding the possibility to configure activity behaviour at this dialog would be nice. And who knows, if I am bored one day I can create special rules for work and private contacts (so friends only appear on the private acitivity :) ).
Comment 17 Dirk Wallenstein 2012-05-05 11:36:09 UTC
(In reply to comment #1)
> Does anyone have an elegant solution to this? rrix got halfway through
> adding activity support to the "special window settings" dialog, but I think
> the code was lost in a disk failure. Besides, that dialog is kinda scary; it
> would be nice to have an easier way to apply such things to windows & apps.

Adding that to the dialog would be really nice.  Could that be revived?

Generally, I think there should never be an activity switch when clicking on anything in the tray!  In my opinion those are kind of global tools (music, irc, etc).  If that poses some problems, it would at least be nice if a stopped activity would not be started.  I stop activities a lot so that I don't have editor lock files and such around all the time when I don't need them (and of course memory).

Or maybe could the persistence of the "On All Activities" setting be improved ? It does not survive it for apps in the tray (at least not when some activities are stopped). 

Anyway, a "Special Application Setting" would be really nice.
Comment 18 Dirk Wallenstein 2012-05-06 08:15:27 UTC
Two cents:

How about using such global tasks instead of sharing tasks between activities.  You would choose to make a non-tray task global and then it would get a special item in the tray, with the (at least for my usage) usual behavior of "closing minimizes to tray" and really closing with right-click=>Quit.

I see this more like concurrently running desktop sessions with some globally available tasks.  I think an activity switch should always be explicit, and not implicit.  But maybe there could be a separate task switch pop-up menu (or similar) that lists all tasks grouped by activity so that there is a way to find any task on the machine.
Comment 19 Martin Flöser 2012-05-18 16:43:16 UTC
Window Rule support available in 4.9:

ID: bf0a241c2462072fbc52012784fa51b9b42a1baf
Added by Ivan Čukić 1 day ago

Adds activity window rules to KWin

- adds the kcm rule option to set the activity - one or all option like
for virtual desktops
- makes the windows obey the rule
- makes the rule enforced even when the user tries to change the
window's activity via the alt+f3 menu

REVIEW:104972
Comment 20 Thomas Lübking 2012-05-30 16:21:59 UTC
*** Bug 300878 has been marked as a duplicate of this bug. ***