Sirsha.com

Sometimes I like to think about...  stuff... .. .
Welcome to Sirsha.com Sign in | Join | Help
in Search

Sirsha Development Resources Blog

because everyone always wants more documentation...

Stop Steaing My Focus, MAN

Jeff Key wants to end default buttons on Focus-Stealing Dialogs but I think the problem is bigger than that. I don't think ANYTHING should be able to steal my focus while typing. I have ranted about this before both in places where it could help (emails with MS employees) and in places where it can't (certain blogs). Not only is it annoying to suddenly find myself typing in a IM conversation with someone on AOL when less than half a word ago I was typing an invoice for a client, it is DANGEROUS for programs to be able to steal focus like this.

Here is a classic example that happens more than you might think: Johnny is surfing and chatting with friends via MSN Messenger (insert any other task here) and typing away as fast as his 2-fingers will carry him. While in the middle of typing "silly", he suddenly hears the "dink" sound that happens when you try to do something that a dialog doesn't want you to do. It "dinks" twice on the 2 L's and then, as his finger hits the "y" key and he looks up, the cause of the problem is gone. He shrugs and continues typing, filling in the missing "lly" and forgetting the whole situation. Unfortunately, the search toolbar he just installed accidentally comes with a very nice trojan horse that pops up new IE windows every time he gets online. He doesn't remember installing anything but, for some reason, I won't believe him when he says that. "sure, you didn't" I say as I help him uninstall the triple-digit leagon of spyware now running in the background.

There is no reason that a program should be able to steal my focus. When I Outlook, I don't sit slack-jawed waiting for it to open, I go back to whatever I was doing, Outlook should open behind my current window.  If it must, then it can pop up in my way visually, but if I am typing then I STILL want to be typing wherever I was, not wherever the latest window popped up, be it Outlook, IE, AIM, or anything. There are NO circumstances where this is acceptable or preferable.

Published Friday, December 19, 2003 8:52 PM by sjh
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

milbertus said:

Wasn't this whole problem supposed to not happen in the first place? I seem to recall that a while back Microsoft stating that no app should just take the focus away from the current app, or even put itself in front of the currently active window. This is why apps which want your attention now flash in the task bar, instead of just jumping in front of the current window in focus.

Granted, this doesn't mean that all apps will behave properly. But I guess it's something.
December 19, 2003 10:57 PM
 

Shannon said:

unfortunately, it doesn't always work that way. The ability to steal focus still exists. "Behave properly" isn't really the issue to me, I blame Windows for allowing it to happen, period. This is a question of OS functionality.
December 20, 2003 1:27 PM
 

Richard Tallent said:

It doesn't solve the OS problem, but one application-centric solution are "user interface continuations." Click my name to read my post on them...
December 22, 2003 10:20 AM
 

Shannon said:

Thanks Richard. That's a very interesting document you linked to.
December 22, 2003 9:15 PM
 

Chris said:

download powertoys for windows xp from microsoft. under general tab there is a setting to prevent windows from stealing focus and force them to flash in the task bar for a prescribed amount of times instead. i hope this works. you can find powertoys at: www.microsoft.com it should be in the top 10 downloads there
January 26, 2004 5:52 PM
 

Benny said:

March 14, 2004 8:56 PM
 

TrackBack said:

August 7, 2004 8:14 PM
 

anon said:

I'm completely in agreement. NO application should EVER be able to steal focus. IMHO this also goes for popping up windows in front of the one currently being "active" (ie. "having keyboard focus" and/or being topmost on the screen.) While I too could live with a solution only previnting the former, I can't see any reason for popping windows up in front of the active one (since the taskbar-flashing should make me aware of these anyway, and I've yet to see a popup/dialog SO important that I would have regretted waiting to see it.)

I also agree with the opinion that this is purely an OS issue. One can't (and certainly shouldn't) expect application programmers (which would include those making nag-ware etc.) to "behave" according to some MS "rule of conduct" (which, btw. they themselves break frequently, in fact MOST of my problems with this issue stem from some MS app or the OS breaking this rule, as most non-MS applications actually honors this rule).

Actually this problem should be relativly simple to solve, as I guess one would "just" have to produce a small util that either hooks into the OS messages and/or replaces the (MS/OS) DLL that handles the popping up of dialogs etc.

In this manner, one should, aside from allowing a global/default how-should-dialogs-behave configuration (ie. "Don't steal my focus"), also be able to "add" some functionality to all (standard, at least) dialogs, such as providing a context menu with choices such as "Always answer yes to this dialog" etc.

However, I have yet to see any utility bragging about this functionality, and this despite a number of available products that will modify the OS behaviour in many other (probably more difficult to code) ways.



Hope someone decides to make such a util someday soon...

Regards,

ACN.
October 25, 2004 2:38 PM
 

Keith F. Kelly said:

You're absolutely, 100% correct - NO program or window should EVER be able to steal focus away from what the user is doing. This has been my biggest pet peeve with Windows for years. It's not only obnoxious as hell, but dangerous, as your example illustrated.

While there are some PowerToys and what not that halfway solve the problem, they still aren't bulletproof; various types of dialogs and windows are still able to steal focus. This absolutely has to be solved within the OS in a generalized way.

November 5, 2004 1:39 PM
 

Sanne said:

Yeah athe tweak powertoys thing has not an option to turn the stealing off AND turn off flashing completely. Totally idiots.
November 18, 2004 7:31 AM
 

TrackBack said:

March 2, 2005 6:43 PM
 

Cow said:

I have seen mainy developers complain that focus stealing is ness. I had one pogramming friend that never got it.. he would always counter "But what if my program needs to tell you something?"
I admit that for the corporate users sometimes you want some focus stealing..
IE the alarm that tells you not to miss the meeting..
the quick pm the boss is coming..
or the critical app that stopped for some reason. I think it is mainly ego and for microsoft future advertisement methods.

with that said every 3 months or so i look for a way to stop focus stealing.. I have lost hours of typing over the years to it and many a password. Many people like me want and demand control over our pc's. PC's can be stressful enough without focus stealing.

To keep all parties happy every program should have a focus stealing option.
IE i will allow the mission critical sql database to steal my attention but nothing else..
maybe even a cool IRQ-like settings for programs.. that gives a focus stealing hirearchy..
maybe we can get a good programer to make somethig like that..
I have seen always ontop makers work.. i am sure it shouldnt take much to take the idea further.
OR maybe as been suggested before.. SIMPLY no windows should steal focus while typing.. IF absolutely important.. it should beep
June 16, 2005 10:55 PM
 

Bullock said:

Cool stuff! I surfed here looking for an app to stop stealing the focus, it is driving me nuts - I fully echo every sentiment expressed here ;) Every application seems to think it is somehow special, and the standard registry hack doesn't seem to work any more.

Interesting that the last visitor added recently to an old thread - same as me. Does this mean that focus stealing is on the rise of late?

Perhaps it's just me and my line of work - I have dozens of different apps running at any given time, and it just gets unbearable.

While I'm here, I'll whinge and rant about MSN Messenger same kind of issue - when you click on the 'x' that means that the application should EXIT, not minimize to the system tray ... if I had wanted to minimize, I would have clicked minimize. Duh! Application developers should realize that standard interface conventions are there for a reason ... and that there will be a huge backlash from the user public somewhere in the piece = rejection of software on usability terms.

well ... good to get that off my chest. Now to keep looking for that mythical anti-focus-stealing addin ...
July 10, 2005 1:03 AM
 

Shannon J Hager said:

You know, Bullock, I have grown to expect to be able to choose what action happens when I click the "x". There are many programs I use that I want in my notification area and not taking up space on my taskbar. That would include music players, IM programs, RSS reader, OneNote, etc. When I "close" those programs, I don't really care to exit the program, just to get the out of my way.
Some software, such as Trillian, has 4 buttons in the top left corner: hide, minimize, maximize/restore, close. That works for me but having the "x" function as "hide" is also okay with me, as long as I can choose that action in the program preferences.
July 10, 2005 2:31 PM
 

Bullock said:

I was wondering if someone would post reply to that.

The main point is that the application behaves in a fashion different to what the user was expecting, and degrades the user experience and feeling of control. So in focus-stealing, if you are expecting to be typing, then the focus change denies your intent - blocking your mental path.

I won't argue with your example. Since you've come to expect that behaviour from those apps, then this is actually evidence that through their design developers have now effectively altered the commonly accepted UI standard (for better or for worse). Trillian sounds cool, rather than alter an existing UI concept, it has extended it.

The issue perhaps is the muddy waters - ... if MSN messenger can not only steal the focus but also make my eyes shimmy, then what is next? Will the 'noise' in the everyday desktop experience drive people to abandon modern computing in droves? Possibly, just like everyday spam has discouraged some people from using email.

PS. After a second round (which led me back here) I couldn't find anything beyond the TweakUI hack. Chow.
July 11, 2005 9:38 AM
 

Craig said:

Thanks Benny for that link.
August 1, 2005 4:09 AM
 

XyberX said:

yeah this focus stealing garbage is driving me insane, xp has so many gremlins ive thought about down grading back windows 9x technology. i cant stop some of the stupid-STUPID CRAP, ive seen in xp and the GUI is only the begining. supposedly you can go to heky current user/software/microsoft/windows/currentversion/explorer/visualeffects/taskbaranimations/ and set default applied and all that crap to zero but i dont think it works give it a shot.
February 13, 2006 4:15 PM
 

colony said:

this site has a registry entry to stop that perminently
http://windowsxp.mvps.org/
February 22, 2006 5:03 PM
 

NNM said:

Totally agree, NOTHING should EVER steal my focus....
September 11, 2006 6:46 AM

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server, by Telligent Systems