In XFCE 4.4.0, when an open window (i mean not iconified/hidden) get the focus, it is moved to the current workspace.
This is particularily anoying when clicing on some URL (within Terminal or claws-mail for exemple) because Firefox is moved from its workspace to the current, which force me to 1) alt-tab back to claws-mail (so i can continue reading the mail where the URL was) and 2) move back firefox to its (dedicated) workspace.
So i tried the focus stealing prevention option, but while it solve the workspace switching problem, it brings many othe focus problems : new windows won't get focus while they should, etc.. (see #2677 for mousepad and #2674 for thunar but it happens with other apps).
So, i see at least 2 solutions here :
1) simply never bring a focused window to the current workspace (and let the taskbar and/or the windowlist applet flash to notify the user)
2) add an option to the focus stealing prevention so that it can be activated for all workspaces *except* the current one (which will solve the problem of newly launched apps that do not get the focus).
3) well... something smarter...
Anyway, i would really prefer that windows that i opened on a particular workspace stay where they are whatever could happen (except if they were hidden in some way, like in #115 i think).
Firefox raises its window when an instance is already running and a new window is requested.
There is no easy answer to that problem. If you click on a URL in your mailer, don't you expect the URL to be opened and become visible somehow?
So leaving the window on the other workspace is all case wouldn't be an option. Unless you show all tasks from all workspaces in the taskbar, you won't get notified and nothing will happen at all when you open the URL, which looks buggy to me.
Adding focus stealing prevention to all workspace but the current one doesn't make much sense to me, partly for the same reasons, ie you won't get notified for windows on other workspaces unless you show all tasks from all workspaces in the taskbar.
As you see, I'm yet to be convinced that the proposed solution do bring anything usefull. Why not fixing Firefox instead, like opening a new window if the current one is unmapped. Sounds like the current Firefox behavior is designed for that other system that doesn't have workspaces...
(In reply to comment #1)
> There is no easy answer to that problem. If you click on a URL in your mailer,
> don't you expect the URL to be opened and become visible somehow?
Yes i suppose. But what if the mail contains more than one URL ? Then you may want to click on every of them before going to firefox. Or if you read many mails clicking on URLs for later reading (which i do a lot while reading RSS feeds or mailing lists in my mailer), then you want to stay with your mailer focused, and you do not want a firefox poping on top of it.
In those cases, an auto moved firefox is just getting in the way.
> So leaving the window on the other workspace is all case wouldn't be an option.
Mmm, i found myself really satisfied with the following procedure (coming from openbox):
- click the URL,
- eventualy click on more URLs,
- switch to the workspare where firefox live.
> Unless you show all tasks from all workspaces in the taskbar, you won't get
> notified and nothing will happen at all when you open the URL, which looks
> buggy to me.
Yes, if nothing at all happen i agree (even if i dealt with it in my previous openbox). But the taskbar is not the only option to get notified : even with a taskbar that don't display apps living on other workspaces (which is my case), you may have the windowlist applet that can display "urgent notifications" for all workspaces. I found this configuration highly usable when experimenting with the current focus stealing prevention option.
> Adding focus stealing prevention to all workspace but the current one doesn't
> make much sense to me, partly for the same reasons, ie you won't get notified
> for windows on other workspaces unless you show all tasks from all workspaces
> in the taskbar.
I find this to be only a matter of informing the user that if he choose to activate focus prevention or no-auto-switch or something, he should use something to get notified (taskbar, windowlist...), which a default configuration could provide.
> As you see, I'm yet to be convinced that the proposed solution do bring
> anything usefull.
Well i don't know what i could say to promote a new option/behaviour. But i know for sure that the current one gets in my way of doing things :(
Maybe one just have to improve the current focus prevention or fix the apps that don't get focus when launched ?
> Why not fixing Firefox instead, like opening a new window if
> the current one is unmapped.
Oh no! please don't make firefox create new windows ! new tabs rules, even unmapped ones ;)
(In reply to comment #1)
> Firefox raises its window when an instance is already running and a new window
> is requested.
Do you mean that my problem is with firefox doing something bad it should not, and not with xfwm who brings windows to the current workspace when they get focused while beeing somewhere else ?
(In reply to comment #3)
> (In reply to comment #1)
> > Firefox raises its window when an instance is already running and a new window
> > is requested.
> Do you mean that my problem is with firefox doing something bad it should not,
> and not with xfwm who brings windows to the current workspace when they get
> focused while beeing somewhere else ?
It's not a matter or what is right or wrong. It's rather a matter or reacting to something Firefox does.
bAsically, Firefox just raise its window, it doesn't focus it, it doesn't map it, just raise it to bring it in front.
The window manager is there to manage windows. So what is it supposed to do with a window that raise itself? Well, if it's on the current workspace, the obvious answer is to raise it, and focus it.
Now what about a window that is aised on another workspace? It's clear that Firefox raise its window so that it's seen by the user. But if it's on another workspace, there is no chance the user will see it. So? Just leave it hidden, lost in another workspace?
Well, it might be okay for you, but there ar eplenty of applications out there, and a window raising itself might very well be important. So, for me, it makes perfectly sense to bring a window to the current workspace when it raises itself so that the user actually has a chance to see it.
Another option would be to change the workspace the one where the window resides, but it's a lot more intrusive.
I'm not saying that Firefox is doing something bad, I'm just saying that xfwm4 reacts correctly IMHO to a winodow raising itself so it can be seen.
(In reply to comment #4)
I see your point. And to be precise, i am not saying that the xfwm reaction to this event is bad, i just say i wish i could influence the way it react so it can fit my particular needs (like i am currently able to do it for the focus model ("clic to focus" or "follow mouse to focus"), for exemple).
You talked about two ways of reaction :
1) move the user to the workspace where the newly focused windows is. But as you said it is the most intrusive reaction, for obvious reasons.
2) move the focused window to the current workspace. This is the default but may be inapropriate in some situations (the one i described in the begining, even if not common). That's why i would like to promote a third possible reaction :
3) do not change the current workspace, do not move nor focus the offending window, just notify the user that an app require attention somewhere thru WindowList or Taskbar or whatever is able to enlight the event (a sound? a big flashing red transluscent arrow pointing to the appropriate workspace? Einstein popping on my screen? ;) ).
As i understand why it can't be the default behaviour, i just wish i could make xfwm react this way via a configuration option.
There are different use models for a Window Manager with workspaces. For some users, having Firefox switch workspaces when a link is clicked in another program might be the right thing. However, for others, myself included, Workspaces are used to isolate different programs, and having them switch workspaces on their own is totally broken. For me, Firefox goes on workspace 1, always. Therefore, I know exactly where to look for it.
The real reason this behavior is a problem for me is because kdbg brings itself to the foreground when a breakpoint is hit. I might be in a different workspace typing an e-mail, and boom, the debugger pops in that workspace.
Please consider making this an option. I agree that a lot of options in a GUI is usually due to poor design, but I really can't live with it the way it is and I don't look forward to creating my own patch (which will probably not be entirely correct anyway).
Ok, so I'll consider a hidden option for the 4.4 branch (since the UI is frozen in stable release) and add an option to the WM tweaks in 4.6 branch.
Option added to SVN trunk.
Note: It seems that Ubuntu includes a patch that prevent Firefox from raising itself.
(In reply to comment #7)
> Ok, so I'll consider a hidden option for the 4.4 branch (since the UI is frozen
> in stable release) and add an option to the WM tweaks in 4.6 branch.
Please do. I find the current behaviour very annoying as I lay out my windows on different workspaces the way I want them and then have to move firefox back where I had it whenever I click on a URL in an email.
It's already implemented in trunk
Fix backported in xfce_4_4 branch as a hidden option (because of string freeze, this cannot be added to the GUI in 4.4). Should be enough to fix that bug I guess.
Created attachment 1064
Patch to not bring activated windows to the current workspace.
Because i did not want to wait for the next 4.4.x and based on what you did in trunk, i made my 4.4.0 behave the way i want it to with this minimal patch.
ps: i have a modified gentoo xfwm4-4.4.0.ebuild that applies this patch, if someone has some interest in it.
Thank you for implementing this.
For those like me who did not find details about the new hidden option available in 4.4.1 : it is now named ActivateAction, it is a string that can be set to 'bring' (default), 'switch' or 'none'.
So i added the following in ~/.config/xfce4/mcs_settings/wmtweaks.xml :
<option name="Xfwm/ActivateAction" type="string" value="none"/>
And now i'm happy ;)
Olivier: i assume you did not close this bug for some reason, so i won't update its status myself and leave it as assigned.
(In reply to comment #13)
> Olivier: i assume you did not close this bug for some reason, so i won't update
> its status myself and leave it as assigned.
Oops, if it's ok, then we should resolve the bug.
*** Bug 3201 has been marked as a duplicate of this bug. ***
*** Bug 3390 has been marked as a duplicate of this bug. ***