Bug 348231 - Bring window to current activity when selected
Summary: Bring window to current activity when selected
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kwin
Classification: Plasma
Component: activities (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Ivan Čukić
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-26 07:35 UTC by Simone Gaiarin
Modified: 2018-03-07 22:43 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
attachment-13391-0.html (1.57 KB, text/html)
2015-05-26 11:43 UTC, Simone Gaiarin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simone Gaiarin 2015-05-26 07:35:37 UTC
The idea of activities is to keep different applications grouped by theme in different containers which should not interfere with each other.

Now the awkward behaviour I often experience is that sometimes performing some actions, the activity is switched automatically, violating the previous principle. In particular:
1) Clicking on a systemtray icon to show the main window (e.g. konversation, skype) switches the activity if the window is currently open on a different activity
2) Opening a file that is already open in a different activity switches the activity

I think that a better behaviour would be to open the same instance of the application also in the current activity, by setting its visibility to multiple activities, because I expect that if the user hasn't switched activity intentionally, probably it needs that window in the context of the current activity. Moreover some applications, like skype are not linked to a particular activity, so that it doesn't make sense to switch the activity when they are used.

I experience this behaviour on plasma4, I'm not sure if it has been changed on plasma5.

Reproducible: Always
Comment 1 Ivan Čukić 2015-05-26 07:55:50 UTC
Related bug https://bugs.kde.org/show_bug.cgi?id=323198

This is a problematic issue.

People sometimes tie specific applications to specific activities. For example, amarok to Multimedia activity, Konversation to 'KDE Development' activity (my case) etc.

If we were to bring up those applications to the current activity, it would break the encapsulation.

If you want to have applications like skype and alike on all activities, you can create window rules for them and you'll not have any problems with activity switching for those applications. (alt+f3 > more actions > special window settings)
Comment 2 Simone Gaiarin 2015-05-26 11:43:08 UTC
Created attachment 92828 [details]
attachment-13391-0.html

Ok. I see your point. One question: what is the official way to tie an
application to a specific activity? Is this feature available in Plasma4?
Or you just do it by setting a specific window rule?


On Tue, May 26, 2015 at 9:55 AM Ivan Čukić <ivan.cukic@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=348231
>
> --- Comment #1 from Ivan Čukić <ivan.cukic@kde.org> ---
> Related bug https://bugs.kde.org/show_bug.cgi?id=323198
>
> This is a problematic issue.
>
> People sometimes tie specific applications to specific activities. For
> example,
> amarok to Multimedia activity, Konversation to 'KDE Development' activity
> (my
> case) etc.
>
> If we were to bring up those applications to the current activity, it would
> break the encapsulation.
>
> If you want to have applications like skype and alike on all activities,
> you
> can create window rules for them and you'll not have any problems with
> activity
> switching for those applications. (alt+f3 > more actions > special window
> settings)
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 3 Ivan Čukić 2015-05-26 18:10:26 UTC
> application to a specific activity? Is this feature available in Plasma4?

It is available in P4 and P5. There is no nice UI at the moment - you'll need to set the window rules.
Comment 4 Simone Gaiarin 2015-05-27 07:25:18 UTC
Ok. This trick is very interesting. Here some considerations:
- It works very well to associate a window to all activities (e.g. skype)
- If I associate a window to a single activity, the behaviour is kind of weird, because when I open it, it is shown in the other activity, but the activity is not switched, so that the user may think that nothing has happened or that the application crashed on launch. I would expect that the activity is switched as in the case when the file is already open.

I also must say that activities are very poor documented (in the official documentation). 
https://docs.kde.org/stable4/en/kde-workspace/plasma-desktop/zooming-user-interface.html

Indeed some of the feature of activities, like this trick or what does mean stopping an activity, are not mentioned.
Comment 5 Ivan Čukić 2015-11-14 18:01:00 UTC
> If I associate a window to a single activity, the behaviour is kind of weird, because when
> I open it, it is shown in the other activity, but the activity is not switched

I can not confirm this, at least not in plasma 5 - opening a window that is tied to another activity switches to that activity.


> I also must say that activities are very poor documented (in the official documentation). 

Most of the things are. Poorly documented, or out of date. That is the usual (and unfortunate) thing that happens with the user-facing documentation.
Comment 6 Simone Gaiarin 2016-10-27 21:06:02 UTC
I'm still facing the problem that some applications (like VLC) are opened in another activity but the activity is not switched.

I've set a special rule: "Specific Application settings" > Size and Position > Activity:Apply Initially:MultimediaActivity

Running KDE 5.8.2.

What info can I provide to debug this behaviour?
Comment 7 Ivan Čukić 2016-10-31 07:41:52 UTC
> I'm still facing the problem that some applications (like VLC) are opened in
> another activity but the activity is not switched.
>
> I've set a special rule: "Specific Application settings" > Size and Position
> > Activity:Apply Initially:MultimediaActivity

If the application is set to go to a specific activity, it does not request focus and therefore KWin does not need to switch the activity. Now, I agree that just opening the window in another activity might confuse the user, but at the same time, automatically switching is (IMO) not the way to go.

I'd rather go for a notification like 'application is opened on BlahBlah activity' with a 'Switch' button on it.
Comment 8 Simone Gaiarin 2016-11-29 12:01:19 UTC
So the behaviour is a little inconsistent among applications.

When I tie the following applications to a specific activity and I open them:
- VLC opens in the target activity and the current activity is NOT switched 
- kate, atom and others opens in the target activity and the current activity is switched to the target activity 

I agree with you that a popup telling the user what's going on would be useful, but also the behaviour should be somehow consistent among applications.

As it is now seems a little random.
Comment 9 Ivan Čukić 2017-01-02 10:07:22 UTC
> I agree with you that a popup telling the user what's going on would be useful

Sadly, this is not something we could really influence. VLC does not try to steal focus when it opens, and Kate and others do, so they get switched to (and the activity gets switched as well).

I'll see whether something can be done to unify these two behaviours. Maybe KWin could ignore the 'force focus' request for windows on other activities...
Comment 10 zeta 2018-03-07 05:37:30 UTC
I can confirm this as well. Have my votes.

1) Clicking on a systemtray icon to show the main window (e.g. konversation, skype) switches the activity if the window is currently open on a different activity

This should be configurable because it may be a correct use case for some users (eg, if they have an activity for chatting and they want to be switched). Options should be a: switch activity (current behavior) b: add window to current activity.


2) Opening a file that is already open in a different activity switches the activity

Should be configurable as well for the same reason. (I just tried it with libreoffice and it didnt even switch the activity, so go figure...)
Comment 11 Ivan Čukić 2018-03-07 22:43:49 UTC
KWin is frozen for any new features on X11 [1], so this will not happen even if someone writes a patch for it.

This can be revisited for Wayland when KWin on Wayland starts supporting activities.

[1] https://blog.martin-graesslin.com/blog/2018/01/kwinx11-is-feature-frozen/