Tuesday, May 01, 2007

Focus stealing

Who knows how to prevent applications from stealing focus in Windows XP? Before responding, please note the following:

I use Windows XP Home and Professional, and have no malware on my systems.

Here's a fairly good description of the problem:

    When an application needs your attention—or when it simply wants to annoy you—it steals the focus from the application in which you're currently working. This leads to frustration as you flip back and forth between windows. The settings in the Focus category prevent that scenario by causing applications to flash their taskbar buttons to get your attention rather than stealing focus from the application in the foreground.

The following "fixes" do not work:

1. Edit the ForegroundLockTimeout key in the registry. If focus is being stolen, the value for this key is probably set to zero. Changing it to 30d40 (in hex) is supposed to fix the problem. It doesn't, because after a half hour of using the computer, the focus stealing starts up again. When I check the registry, I find that the value has been changed back to zero. Something (i.e. an application) is changing it back. Now why would Microsoft allow applications to do this? Also, the stealing occurs even when the value is correct.

Image Hosted by ImageShack.us

2. Use a Microsoft utility called TweakUI. This applet has a focus section, where applications bent on stealing focus can be thwarted. As it turns out, this is a simple way to change the ForegroundLockTimeout key. As with manually changing the key value, the TweakUI setting mysteriously changes to allow focus stealing to continue.

Image Hosted by ImageShack.us

3. Tell Firefox not to steal focus. To access Firefox's "secret" configuration area, type about:config into the URL field and press ENTER. Double-click browser.tabs.loadDivertedInBackground to change the value from false to true. Hailed as a magic cure for stopping Firefox from robbing me of my precious time, it does nothing.

4. Adjust Firefox's Javascript settings. In Firefox, go to Tools, Options, Content, Advanced Javascript. De-select "Raise or lower windows." This doesn't work, either.

Image Hosted by ImageShack.us

No comments: