« New camera | Home | Understanding Performance Trade-offs »

Stealing Focus

By Jacob Cohen | August 30, 2007

Applications are sometimes slow. In fact, the longer you use an application, the slower it becomes. Or rather, the application stays the same, and you get faster at using it, so it seems slower than it used to.

Perhaps you no longer wait for slow web pages to load, and instead you load them in a separate browser tab and switch to them when they have finished loading. Maybe you don’t wait for your e-mail client to prepare a folder for viewing, and switch to a different application while that is happening.

The more you do other things instead of just waiting for a slow application to finish, the more you see of a new problem that can happen on Windows systems. The problem of applications stealing focus.

Some of the applications will, when they have finished whatever slow task you have set them to, focus themselves in front of whatever else you were doing. Apple’s iTunes/Quicktime updater is particularly egregious about this, it will refocus itself after every step of a process that has no reason to ever be in focus. It should happen in the background. Microsoft Outlook is another. If you load a large folder and it takes a moment to prepare the view, it will steal focus back once it has finished.

Why is this behavior allowed? Applications already have a perfectly reasonable means of letting you know they need your attention again - they can flash their taskbar tab. Better yet, maybe the designer of the application should realize that they have no real reason to demand the user’s attention, and patiently wait for the user to switch back to the application.

Topics: General |

11 Responses to “Stealing Focus”

  1. b_jonas Says:
    September 2nd, 2007 at 10:21 am

    This annoys me the most when I’m typing a password in a window and suddenly I find that it’s revealed in an input box of a completely different application.

  2. Sean Says:
    September 29th, 2007 at 11:36 am

    This exact thing happened to me with Apple’s updater. I was in another window, typing away, and obviously hitting the space bar. Apple stole the focus, and the “Cancel” button was automatically selected on top of that… so I was typing, then all of the sudden I have canceled the entire update.

    Terrible programming.

  3. YarekT Says:
    October 17th, 2007 at 10:21 am

    I agree with you, this is a problem on windows. But i do not agree with you when you blame the designers of individual programs. See, the program doesn’t “steal” focus, rather it sends a signal to your window manager (in case of windows, it is windows.. quite obvious) that the application requires some sort of attention, and then the window manager should decide whether to give application focus. So the fundamental problem here is not with applications but with Windows.

    Just to make it clear, im not trying to convert anyone……but….. you wouldn’t encounter this problem on a Mac. And certainly it would never happen in Linux.

    You should be able to find some “hack” (windows is famous for having the need for hacks) change the way focus is treated.

  4. Jacob Cohen Says:
    October 18th, 2007 at 9:01 am

    I’m not sure I buy that. Some applications do it better than others, such as flashing the taskbar icon or putting a message in the corner of the screen, rather than switching window focus. There must be some programmatic difference between the various actions that is being chosen by the application authors.

  5. John Says:
    November 4th, 2007 at 1:57 am

    Within the free TweakUI utility from Microsoft there is a setting to prevent applications from stealing focus. This works for a while but this setting seems to get lost after a while so you have to rest it.

  6. pauljs75 Says:
    November 13th, 2007 at 10:48 pm

    I hate it when antivirus programs do this. It’s annoying to be typing along or playing a game and have that “getting updates” screen stop what I’m doing and getting in the way. Can’t they tell when I’m busy and keep it in the background? (AVG - that means you! But I’m sure others are guilty too.) I don’t need to know every time that it’s getting the update - I’d expect that it should, also the taskbar/tray icons changing should be enough of a clue already.

  7. iTunes Aggravated Says:
    November 21st, 2007 at 9:58 am

    iTunes in general removes the focus whenever it damn well feels like it.

    Try sorting by a column, then changing a value in of that column in place. If the item you’re editing should move to a new position — poof — there it goes. You haven’t even hit Return yet. (When you do hit Return, an arbitrary song will start playing!)

    I have my On CD Insert preference set to “Import CD.” This preference is a dropdown that includes other options “Show CD” and “Begin Playing.” However, the CD device playlist always grabs focus immediately anyway.

  8. iTunes streaming too Says:
    January 21st, 2008 at 3:18 pm

    iTunes pops up with an annoyong “buffering” window this whenever there is any kind of delay in streaming radio. Just buffer, leave me alone! If you’re in the middle of typing something, the default action when you press enter is to cancel buffering (and turn off the radio). So aggravating.

  9. DragonL Says:
    February 10th, 2008 at 1:56 am

    Yes, there is a programmatic difference, and yes, it’s terribly annoying. I tend to immediately uninstall any software that behaves this badly.

  10. Hobbes Says:
    February 15th, 2008 at 7:40 pm

    What? Mac doesnt have this problem? heck yeah!
    It’s really great to use Spaces on mac, but I hate it when I upload a file using dreamweaver and, while waiting, I go to type a mail. Then the fraking DW steals the focus (even if I hit the HIDE button on the ftp conn. dialog!) and I find myself typing over my code!!

    And yup, the OS developers and the software developers are to blame. Some apps never steal focus, they just use the jumping icon in the dock or system messages that can be shown with Grabber or many other programs.

  11. Joe Says:
    May 19th, 2008 at 8:04 pm

    I totally agree. I wish there was a hack somewhere for this. I do alot at one time while waiting for stuff to load and other programs always steal my focus on windows while im typing login information and i hate that. I hate it!… yep!

Comments

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word