29
Dec
2007
0:00 AM

Computer Stuff

Today's entry will be boring, but it's about something that annoys the snot out of me.

I'm talking, of course, about applications that steal focus. This happens primarily in Windows, though I've had apps do it to me in MacOS before - just not with the alarming frequency that it happens with on Windows.

First off, the window manager should be made in such a way that prevents this in the first place. Windows can kinda sorta prevent it, but it's an option that's turned off by default on our build (Not sure if it's off by default or if that's something my company changed in our build). If we navigate to the following registry subkey....

HKEY_CURRENT_USERControlPanelDesktop

then we can create a DWORD called ForegroundLockTimeout and set a hexidecimal value of 0x00030d40 - or decimal 200,000. This basically makes applications wait 200 seconds (I think) before they can take focus. However, Windows seems hard-coded to give a newly-launched application focus by default, so if you have an app that opens a jillion windows in rapid succession (Like say, for instance, Novell Application Launcher distributing an app) and you're trying to work on something else, the windows will constantly pop up over what you're doing.

Stealing focus from the user is rarely, if ever, acceptable. The one exception I can think of to this is if the workstation decides that it's going to shut down and there's no way to cancel it - in this case, I'm sure the user would prefer to know that the workstation is going to reboot so they could save their work. But that's the only time. It's a horrible coding practice, for a number of reasons.

1) It interrupts the user's workflow. I don't want to have to stop and click on a dialog box or ALT+TAB back to whatever I was doing just because of some egotistical programmer.

2) It causes accidents. Many, many times I've been typing when Windows has popped up some dialog box from a file operation that was running in the background, and of course, Windows interprets my keystrokes as a button push and does something I don't want it to. Stupidity!

At best, this will just annoy me. At worst, I'll lose my unsaved Great American Novel in the background because Windows will force a restart when I keep typing. Also, this particular dialog box abuses the AlwaysOnTop property, which makes me want to kick the programmer in the teeth.

3) It's annoying, like a petulant, obnoxious child butting in for attention. It makes you want to shout "Stop it! Just stop it!" at the program doing it.

There a lot of better ways to get my attention, like blinking the Start menu bar (Itself somewhat annoying, but better than stealing focus.) or using an Outlook-style new-mail notification. The OSX method of getting attention (Making the icons in the dock jump up and down like disgruntled penguins) is cutesy at first, but then it just becomes irritating when it keeps going.

That is all.

Exit, stage left. Sparks