Hi all,
One of the major annoyances I had with MS Windoze was the habit of programs to force themselves into the foreground.
I would have some long running task running in the background, or will have started a "slow to fire up" program, meanwhile I continue working on "the task in hand" with the program in the foreground. When I looked at the screen I see the background task has popped up and forced itself into the foreground and the last half dozen sentences I had typed had been lost to it.
I have noticed that this is also becoming more common with linux (unbutu 10.04) and was wondering if this behaviour is a part of the programs themselves or if there is a system wide setting that will stop it.
That is, I want to be able to specify that the foreground task I am using does not lose focus unless I tell it to.
Anybody out there have more in depth knowledge of this sort of thing?
Nev
On 01-Sep-10 11:19:34, nev young wrote:
Hi all, One of the major annoyances I had with MS Windoze was the habit of programs to force themselves into the foreground.
I would have some long running task running in the background, or will have started a "slow to fire up" program, meanwhile I continue working on "the task in hand" with the program in the foreground. When I looked at the screen I see the background task has popped up and forced itself into the foreground and the last half dozen sentences I had typed had been lost to it.
I have noticed that this is also becoming more common with linux (unbutu 10.04) and was wondering if this behaviour is a part of the programs themselves or if there is a system wide setting that will stop it.
That is, I want to be able to specify that the foreground task I am using does not lose focus unless I tell it to.
Anybody out there have more in depth knowledge of this sort of thing? Nev
This is prossibly more a matter of your desktop/window manager settings than it is due to programs "jumping the queue".
Generally speaking, if you have started up a long-running program in one window on the desktop, and then raise/open another window in order to do something else (e.g. edit a file), then the latter one should "stay on top" unless you take some action which raises the other one (e.e. clicking on its window).
Are you using Gnome? KDE? In Gnome, the sequence Desktop --> Preferences --> Windows will open a "Window Preferences" window which shows the option:
[ ] Select windows when the mouse moves over them
If you leave this unchecked, then things should behave as I describe above. If you check it, then of course if the mouse wanders over to another window while you are typing then that window will pop up to the top.
Even if you leave it unchecked, it is still possible (e.g. on some laptops with sensitive touch-pads) that the movements of your hands while typing can be picked up, causing the mouse to move around unnoticed by you, and at some stage to be picked up and interpreted as a mouse-click (e.g. as a tap on the touch-pad), which would then cause the other window to be raised as though you had done it on purpose, even though you hadn't intended to.
Similarly, if you are using a mouse with a cable and the cable is picking up EM radiation (e.g. mains hum or from power supply brick), then that can cause spurious mouse events.
Another thing in your description refers to a "slow to fire up" program. It could be that such a program itself opens a window once it finally manages to get its shoelaces tied, which then gets priority. For example, one program (a shell script) which I use is invoked from an Xterm window, and that program then opens three new windows. Each of these new windows, as it comes up, is "on top", so it ends up with the third window to open being the one which has the focus. The original Xterm from which the script was invoked is now "at the back of the queue".
I don't know how to over-ride that. I just live with it (the next step being to re-arrange the open windows to where I want to find them when I'm working, so whichever one I'm moving around is going to be the one which gets the focus while I'm doing that; then I click on the one I want to work in).
But, if you find yourself in that sort of situation because of the actions of a "slow to fire up" program, I think I'd just wait until it has got its act together; or else be prepared for it to happen at some stage and watch what you're doing when it happens!
Just some thoughts -- anything more specific would depend on knowing more detail about what's going on when this sort of thing happens.
Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@manchester.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 01-Sep-10 Time: 13:27:00 ------------------------------ XFMail ------------------------------
On 1 September 2010 13:27, Ted Harding Ted.Harding@manchester.ac.uk wrote:
On 01-Sep-10 11:19:34, nev young wrote:
I have noticed that this is also becoming more common with linux (unbutu 10.04) and was wondering if this behaviour is a part of the programs themselves or if there is a system wide setting that will stop it.
That is, I want to be able to specify that the foreground task I am using does not lose focus unless I tell it to.
Anybody out there have more in depth knowledge of this sort of thing? Nev
This is prossibly more a matter of your desktop/window manager settings than it is due to programs "jumping the queue".
Ubuntu's Update Manager does the pop-to-front thing as it switches from downloading the updates to installing the updates. It is definitely not stray mouse or keyboard activity causing it because I had a maximised window in front, and the update over the weekend wasn't the first time I'd noticed. Very annoying!
Tim.
On Wed, Sep 01, 2010 at 01:41:55PM +0100, Tim Green wrote:
Ubuntu's Update Manager does the pop-to-front thing as it switches from downloading the updates to installing the updates. It is definitely not stray mouse or keyboard activity causing it because I had a maximised window in front, and the update over the weekend wasn't the first time I'd noticed. Very annoying!
Yep, when this happens it's insanely annoying. Especially when you hit enter as a dialogue box appears which immediately dismisses it and you don't know what you just agreed/didn't agree too as it was on screen for a fraction of a second.
What would be a nice feature would be to not allow anything to steal focus like this and just have it sit on the window list flashing away merrily to attract your attention.
Adam
Adam Bower wrote:
On Wed, Sep 01, 2010 at 01:41:55PM +0100, Tim Green wrote:
Done it again - sorry Adam.
superwossname of enthusiasm.
Ubuntu's Update Manager does the pop-to-front thing as it switches from downloading the updates to installing the updates. It is definitely not stray mouse or keyboard activity causing it because I had a maximised window in front, and the update over the weekend wasn't the first time I'd noticed. Very annoying!
Yep, when this happens it's insanely annoying. Especially when you hit enter as a dialogue box appears which immediately dismisses it and you don't know what you just agreed/didn't agree too as it was on screen for a fraction of a second.
What would be a nice feature would be to not allow anything to steal focus like this and just have it sit on the window list flashing away merrily to attract your attention.
I don't allow *ANYTHING* to venture into cyberspace without permission.
Neither (if I can help it) do I allow anything in cyberspace to dump into any of my boxen unbidden.
On 01-Sep-10 12:41:55, Tim Green wrote:
On 1 September 2010 13:27, Ted Harding Ted.Harding@manchester.ac.uk wrote:
On 01-Sep-10 11:19:34, nev young wrote:
I have noticed that this is also becoming more common with linux (unbutu 10.04) and was wondering if this behaviour is a part of the programs themselves or if there is a system wide setting that will stop it.
That is, I want to be able to specify that the foreground task I am using does not lose focus unless I tell it to.
Anybody out there have more in depth knowledge of this sort of thing? Nev
This is prossibly more a matter of your desktop/window manager settings than it is due to programs "jumping the queue".
Ubuntu's Update Manager does the pop-to-front thing as it switches from downloading the updates to installing the updates. It is definitely not stray mouse or keyboard activity causing it because I had a maximised window in front, and the update over the weekend wasn't the first time I'd noticed. Very annoying!
Tim.
As I indicated, I think it is default (and possibly unalterable) behaviour that whenever a program opens a new window, that new window has the focus whatever else was happening when it opened. Therefore, if update manager opens a new window after several seconds doing something else, that will have focus and be "on top" even if you had something else on top of the original update manager window. See also[*] below.
As an example of what I mean, enter the following command in an already-open Xterm window:
(sleep 20 ; xterm) &
The original Xterm (or any other window which you switch to meanwhile) will stay "on top" and have focus, then after 20 seconds the new Xterm will pop up and have focus, also overlaying anything it is placed on top of if there was not enough free space for it in the desktop.
As I said, I don't know how (or whether it is possible) to over-ride this.
[*] I have just checked what happens with update manager. As it moves through its succesive stages, at the end of each stage it closes the additional dialogue window and then opens a new one for the next stage. So, if you have started something new in a window which overlays the update manager, each new dialogue window will come up on top of your working window and claim focus.
However, if you start update manager in one desktop, and then switch to another desktop to work in a window there, the successive windows opened by update manager will not appear in your second desktop but in the same desktop that has update manager.
So one solution for this case is to run update manager in a desktop of its own, and do whatever you want in other desktops. There should then be no interference. This of course would require you to switch back from time to time to the update manager desktop, to check progress and to make any required choices/responses.
Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@manchester.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 01-Sep-10 Time: 14:49:24 ------------------------------ XFMail ------------------------------
On 1 September 2010 14:49, Ted Harding Ted.Harding@manchester.ac.uk wrote:
As an example of what I mean, enter the following command in an already-open Xterm window:
(sleep 20 ; xterm) &
The original Xterm (or any other window which you switch to meanwhile) will stay "on top" and have focus, then after 20 seconds the new Xterm will pop up and have focus, also overlaying anything it is placed on top of if there was not enough free space for it in the desktop.
As I said, I don't know how (or whether it is possible) to over-ride this.
It *is* configurable - or at least, there is the ability to change this.
Case in point: I run fluxbox and always had that problem with the windows popping up.
So I tried your command above and it popped up the window and brought it into focus. Very annoying.
So, I went to Configuration -> Focus Model -> and unselect "Focus New Windows" and this no longer happens.
Unfortunately, the new window is brought in front of the old window, but is not in focus - would be nice to not raise it. The "Auto Raise" option seems to have no effect - maybe a bug in this old version of Fluxbox?.
So it seems this is a windowmanager-level thing - or an Xlib thing.
Not sure if KDE lets you configure this - I thought it might have exposed that configuration in 3.x series. No idea about 4.x or Gnome. I would hope there would be a way to configure it.
Srdjan
On 1 September 2010 19:48, Srdjan Todorovic todorovic.s@googlemail.com wrote:
So I tried your command above and it popped up the window and brought it into focus. Very annoying.
So, I went to Configuration -> Focus Model -> and unselect "Focus New Windows" and this no longer happens.
Ugh. On second thoughts, it would be great if you could configure this option on a per binary filepath basis.
Just started watching a DVD, and mplayer window is not in focus, and I start pressing space etc and I just start typing into another window....
Srdjan
On 01/09/10 12:19, nev young wrote:
That is, I want to be able to specify that the foreground task I am using does not lose focus unless I tell it to.
Not a solution, but a possible work-around: does right-clicking the title bar of program you want to keep focus as selecting "always on top" help?
It may not, given that having focus and being on top are not the same things. But might be worth trying.
NB: I also would like to have a solution to this, although I haven't put any effort into finding a solution in the past.
On 01/09/10 14:01, Mark Rogers wrote:
On 01/09/10 12:19, nev young wrote:
That is, I want to be able to specify that the foreground task I am using does not lose focus unless I tell it to.
Not a solution, but a possible work-around: does right-clicking the title bar of program you want to keep focus as selecting "always on top" help?
It may not, given that having focus and being on top are not the same things. But might be worth trying.
NB: I also would like to have a solution to this, although I haven't put any effort into finding a solution in the past.
Thanks to all for the replies so far. It is good to know that I'm not alone in disliking this behaviour.
I am using a gnome desktop.
To give one (of many) examples of how this gets in my way consider this. I'm writing to emails in a maximised window using Thunderbird. I need some info that I have in a spread sheet so I fire up OO. Knowing it will take some 15-20 seconds to start I switch back to TB and continue to compose the email. OO grabs focus when it is ready and I lose what I'm typing (I'm not a touch typist) and / or I overwrite data in the spread sheet now open.
Like Ted wrote it appears that a newly opened window steals focus. It is this I want to stop.
Opening on a different desktop doesn't work as OO will open on the desktop in use not the one it was started in. I guess other programs will do the same.
Selecting "always on top" would be a pain as I would have to minimise the window to get something else in front. Also it doesn't seam to last across invocations.
Any more ideas?
nev
On 01-Sep-10 17:31:39, nev young wrote:
[...] I am using a gnome desktop.
To give one (of many) examples of how this gets in my way consider this. I'm writing to emails in a maximised window using Thunderbird. I need some info that I have in a spread sheet so I fire up OO. Knowing it will take some 15-20 seconds to start I switch back to TB and continue to compose the email. OO grabs focus when it is ready and I lose what I'm typing (I'm not a touch typist) and / or I overwrite data in the spread sheet now open.
Like Ted wrote it appears that a newly opened window steals focus. It is this I want to stop.
Opening on a different desktop doesn't work as OO will open on the desktop in use not the one it was started in. I guess other programs will do the same.
In the circumstances you describe, the only thing I can suggest is that when you start up OO (or whatever) you should do so in its own desktop, and then sit still for the 20 seconds or so that it will take to get going! Once its window is established in one desktop it will stay there (unless you deliberately nove it).
Any other program would do the same as you describe. The example I gave is a simple case in point:
Be working on something (say Thunderbird) in Desktop A. Switch to adjacent desktop B, open an Xterm/gnome-terminal and, in that, do
(sleep 20 ; xterm) &
Immediately switch back to Desktop A, continue working in TB if you like, or just sit and wait. After 20 seconds an ASBO kid will pop up in workspace A and commandeer the focus!
Selecting "always on top" would be a pain as I would have to minimise the window to get something else in front. Also it doesn't seam to last across invocations.
Indeed! The "on top" setting is instance-specific. Also, forcing a window to be "on top", as you say, generates inconvenience when it masks something else, since it won't let the other thing come to the surface.
Any more ideas?
As above -- I seriously suggest relaxing for 20 seconds until everything is in place!
Also, as a general recommendation, rather than have several windows for different things in one workspace and clicking between them, I prefer to have only one or two or three which are closely related, and spread my various windows across several desktops (I have configured the workspace switcher to give me 20 to play with). Using the keys Ctrl+Alt+<arrow> is a very quick way to switch between them.
Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@manchester.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 01-Sep-10 Time: 19:15:54 ------------------------------ XFMail ------------------------------
nev young wrote:
I am using a gnome desktop.
[...]
Like Ted wrote it appears that a newly opened window steals focus. It is this I want to stop.
[...]
Any more ideas?
The venerable WindowMaker has a preference "Automatically focus new windows" right on the first pane of its preferences dialogue. I just tested it with a Ted-style sleep 20 ; xterm command and it worked.
So I think this is a window manager configuration problem. Probably there's some mistake in the Gnome interface guide which requires new windows to get focus. It wouldn't be Gnome's first mistake IMO.
Hope that helps a little,
On Wed, Sep 01, 2010 at 08:16:57PM +0100, MJ Ray wrote:
nev young wrote:
I am using a gnome desktop.
[...]
Like Ted wrote it appears that a newly opened window steals focus. It is this I want to stop.
[...]
Any more ideas?
The venerable WindowMaker has a preference "Automatically focus new windows" right on the first pane of its preferences dialogue. I just tested it with a Ted-style sleep 20 ; xterm command and it worked.
So I think this is a window manager configuration problem. Probably there's some mistake in the Gnome interface guide which requires new windows to get focus. It wouldn't be Gnome's first mistake IMO.
'Modern' window managers don't provide anywhere near as much control of application windows as older ones did. It's one of the things I miss about fvwm (to which I return at regular intervals), one could specify exactly where you wanted each application to run, its window decorations and everything like that.
If you try and persuade modern designers/programmers to provide the same facilities they say "It's not the window managers job" to do this and suggest nasty add-ons like devilspie to do it instead. (I've had exactly this discussion/argument with the xfce team)
On 01 Sep 18:31, nev young wrote:
On 01/09/10 14:01, Mark Rogers wrote:
On 01/09/10 12:19, nev young wrote:
That is, I want to be able to specify that the foreground task I am using does not lose focus unless I tell it to.
Not a solution, but a possible work-around: does right-clicking the title bar of program you want to keep focus as selecting "always on top" help?
It may not, given that having focus and being on top are not the same things. But might be worth trying.
NB: I also would like to have a solution to this, although I haven't put any effort into finding a solution in the past.
Thanks to all for the replies so far. It is good to know that I'm not alone in disliking this behaviour.
I am using a gnome desktop.
I feel sorry for you (but only because I really can't stand the look and feel of a standard gnome desktop - I don't quite work the same way as everyone else).
To give one (of many) examples of how this gets in my way consider this. I'm writing to emails in a maximised window using Thunderbird. I need some info that I have in a spread sheet so I fire up OO. Knowing it will take some 15-20 seconds to start I switch back to TB and continue to compose the email. OO grabs focus when it is ready and I lose what I'm typing (I'm not a touch typist) and / or I overwrite data in the spread sheet now open.
That's not OOs fault infairness to it, that be the window managler again...
Also, not being a touch typist, surely you check the characters that are appearing on the screen occasionally - or are you permanently looking at the keyboard?
(I'm not exactly a touch typist, but my eyes spend a hell of a lot more time on the screen, or sometimes when needing to readjust them, out the window, than on the keyboard...)
Like Ted wrote it appears that a newly opened window steals focus. It is this I want to stop.
Configure the window mangler to not give focus to new windows then - though, you might find that this becomes annoying behaviour later on...
Opening on a different desktop doesn't work as OO will open on the desktop in use not the one it was started in. I guess other programs will do the same.
That's actually a window manager thing, not OO or any other app... awesome (to use an example I'm familiar with) will happily let you start things on completely different tags (it's semi-equiv but more powerful version of desktops). I would also bet that if one got just the right joo-joo in the ~/.Xresources file you could define which desktop to put the app in using the correct hint, but I've not tested that :)
Selecting "always on top" would be a pain as I would have to minimise the window to get something else in front. Also it doesn't seam to last across invocations.
That's because it's just a hint set on the running apps window, the app doesn't even have to know about it at all, it's a window manager thing... Apps that do have an always on top button (rather than the window managers one), are generally just setting the hint and letting the windowmanager do the work anyways (as they should). Apps shouldn't need to worry about such things, it's what window managers are for.
Cheers, Brett
On Wed, Sep 01, 2010 at 06:31:39PM +0100, nev young wrote:
On 01/09/10 14:01, Mark Rogers wrote:
On 01/09/10 12:19, nev young wrote:
That is, I want to be able to specify that the foreground task I am using does not lose focus unless I tell it to.
Not a solution, but a possible work-around: does right-clicking the title bar of program you want to keep focus as selecting "always on top" help?
It may not, given that having focus and being on top are not the same things. But might be worth trying.
NB: I also would like to have a solution to this, although I haven't put any effort into finding a solution in the past.
Thanks to all for the replies so far. It is good to know that I'm not alone in disliking this behaviour.
I am using a gnome desktop.
To give one (of many) examples of how this gets in my way consider this. I'm writing to emails in a maximised window using Thunderbird. I need some info that I have in a spread sheet so I fire up OO. Knowing it will take some 15-20 seconds to start I switch back to TB and continue to compose the email. OO grabs focus when it is ready and I lose what I'm typing (I'm not a touch typist) and / or I overwrite data in the spread sheet now open.
Like Ted wrote it appears that a newly opened window steals focus. It is this I want to stop.
Opening on a different desktop doesn't work as OO will open on the desktop in use not the one it was started in. I guess other programs will do the same.
It's possible to prevent this by using devilspie (plus gdevilspie if you want a GUI). With this you can specify, for example, that Firefox always opens on desktop three.
It's the way I run my system, news and mail windows are always on desktop 1, Firefox on desktop 3 (and sundry other things are fixed elsewhere). If I open a mail in mutt which has a link then I right click on the link and click "Open Link", this opens the link in Firefox on desktop 3 but has no effect at all on what I'm doing in mutt in the terminal window until *I* decide to switch to desktop 3 and look at the link.
Selecting "always on top" would be a pain as I would have to minimise the window to get something else in front. Also it doesn't seam to last across invocations.
Any more ideas?
nev
main@lists.alug.org.uk http://www.alug.org.uk/ http://lists.alug.org.uk/mailman/listinfo/main Unsubscribe? See message headers or the web site above!
On Wed, Sep 01, 2010 at 12:19:34PM +0100, nev young wrote:
That is, I want to be able to specify that the foreground task I am using does not lose focus unless I tell it to.
A bit of experimenting later... If you're using compiz then there is an option found once you've installed compizconfig-settings-manager and run ccsm. There's a button for "general options" and under there a tab "focus and raise behaviour" with an option for "focus prevention level" which is something about trying to stop stuff stealing focus.
Of course if you're not using compiz this won't be helpful, I'm having a bit of a play now and it appears to have improved things somewhat, I might even try to read the docs next.
Adam
On 1 September 2010 20:12, Adam Bower adam@thebowery.co.uk wrote:
On Wed, Sep 01, 2010 at 12:19:34PM +0100, nev young wrote:
That is, I want to be able to specify that the foreground task I am using does not lose focus unless I tell it to.
A bit of experimenting later... If you're using compiz then there is an option found once you've installed compizconfig-settings-manager and run ccsm. There's a button for "general options" and under there a tab "focus and raise behaviour" with an option for "focus prevention level" which is something about trying to stop stuff stealing focus.
I appear to at least have compiz running, so I have install ccsm, run it and changed the setting. I'll let you know how I get on.
Tim.
On 01/09/10 20:48, Tim Green wrote:
I appear to at least have compiz running, so I have install ccsm, run it and changed the setting. I'll let you know how I get on.
Ditto, and it seems to have made no difference?
I have set it to "very high". I type (sleep 2 ; xterm) & then hit enter repeatedly to make sure I'm "doing something". And the new xterm pops up and takes focus.
It may be that I also need to RTFM but I'd be interested to hear what other people are getting,
On Thu, Sep 02, 2010 at 09:03:18AM +0100, Mark Rogers wrote:
Ditto, and it seems to have made no difference?
It's weird, it's certainly working on my laptop as that's where I was testing it last night (setting it to very high meant I couldn't type into the revelation applet on one of the panels) but on my desktop it appears to not be working at all.
More digging required I think.
Adam
I appear to at least have compiz running, so I have install ccsm, run it and changed the setting. I'll let you know how I get on.
It's working for me, I did the (sleep 2 ; xterm) & test while Thunderbird had focus and while xterm popped up in front of the Thunderbird window it did not steal focus. This was with focus prevention set to "high"
However I cannot find any documentation as to what the various levels actually mean (i.e. what makes "high" different to "very high") except some forum posts that suggest that setting this to anything above "Normal" can break some apps that expect focus when they pop up a new window.