Bug 280111 - What to do with windows activated on another desktop - option
Summary: What to do with windows activated on another desktop - option
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 4.6.5
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-15 09:16 UTC by Mirek Długosz
Modified: 2012-03-13 21:53 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mirek Długosz 2011-08-15 09:16:51 UTC
Version:           4.6.5 (using KDE 4.6.5) 
OS:                Linux

While using at least two desktops (workspaces, virtual desktops - whichever name you prefer), windows may need focus while they are on another desktop. E.g. if you are using Kadu instant messenger, you may have chat window opened on desktop 1 and read e-mail on desktop 2. If someone sends you a message while you are on desktop 2, flashing chat window will show up on taskbar. When you click on it, you are transferred to desktop, on which that window resides.
It happens especially for child windows (dialog boxes etc.).

KWin should provide some options to configure that behavior. I can think of five options:
a) flash window name on taskbar, bring window to current desktop on click
b) flash window name on taskbar, switch to it's desktop on click (current behavior)
c) bring that window to current desktop automatically (don't display anything on taskbar and don't wait for user input)
d) switch to that window's desktop automatically (don't display anything on taskbar and don't wait for user input)
e) ignore it (don't do anything with it, don't display anything)

This could be achieved through KWin window rule. That way user could ignore pop up windows of Firefox (unless he or she is actually using it), but get notified about another programs.

Reproducible: Always

Steps to Reproduce:
The best example:
1. open terminal
2. run:
$ sleep 2;  zenity --error --text="test"
3. switch to another desktop


Expected Results:  
I would expect that window to just show up on current desktop, but I know that some users would like to switch to that window desktop, and some would prefer to ignore it at all. Therefore I suggest to create configuration option for it, so anyone can get his or her preferred behavior.

Strangely enough, kdialog windows behave differently than zenity ones. If you run
$ sleep 2; kdialog --msgbox test
pop up window will be displayed on current desktop, without flash on taskbar.

In my task manager settings, I sort tasks manually and switched on filter to show only tasks from current virtual desktop (and from current activity, but I don't really use activities).
Comment 1 Martin Flöser 2012-03-13 21:39:45 UTC
Thank you for your feature request and sorry for the rather late reply.

Some things KWin cannot do at all. E.g. KWin cannot influence the behavior of the tasks bar. For everything else we have in 4.9 the possibility to use KWin scripts. E.g. you could write a script to bring all windows demanding attention to the current desktop. We added these scripting capabilities so that our users can write their custom extensions for their window manager and to be able to share it.

Please see http://techbase.kde.org/Development/Tutorials/KWin/Scripting for further information.
Comment 2 Thomas Lübking 2012-03-13 21:53:40 UTC
a) flash window name on taskbar, bring window to current desktop on click
-> set the window sticky & minimize it when you don't want to see it

c) bring that window to current desktop automatically (don't display anything on taskbar and don't wait for user input)
-> see (a) and make a focus stealing prevention rule, set it to "none"

d) switch to that window's desktop automatically (don't display anything on taskbar and don't wait for user input)
-> just make a focus stealing prevention rule, set it to "none"

Implicitly moving windows to another desktop means to remove them from their context, thus is wrong. If a window fist all contexts, it should be in all contexts, thus sticky.
Not notifying the user is pointless, if the taskbar flashing annoys you, turn it off there, use another taskbar plasmoid or just no taskbar at all.

(Sorry for changing resolution, but most of the requests actually do work)