Please Don't Steal My Focus

oh yeah, and in MS Outlook I’ve often tried to double-click the envelope in the system tray to open my new mail and nothing happens. Then it can sometimes take a minute to find the dialog telling me that Outlook has a dialog box open and I should close it and try again (Expos would be cool here). The offending dialog was asking me if I wanted to archive my old mail it had been hidden behind my other windows. Surely it should have come into focus when I clicked the systray envelope instead of opening another dialog and hiding it behind everything too.

I haz a focuss in adium chat window!

[Adium pops-up dialog saying something like 3 new hotmails]

No!!! they be stealin mai focuss.

[apologies to the lolrus that was traumatised after his buckit was stoled http://icanhascheezburger.files.wordpress.com/2007/01/2001982351398543517_rs.jpg ]

I remembered my old snake program written in VB6. Every time the snake bumped the edge of the window or itself, a critical error dialog box saying “THE SNAKE IS DEAD!” would appear.

So switch to a decent window manager already: http://www.nongnu.org/ratpoison/. Never lose focus. Perform windowing operations without ever touching the rat.

Wasn’t this covered once before or was that another blog/forum?

Start Regedit

Go to HKEY_CURRENT_USER \ Control Panel \ Desktop

Edit the key ForegroundLockTimeout

Give it a value of 00030d40

Reboot

1 Like

I don’t suppose anyone noticed the fix I posted to the stealing focus problem in windows?

1 Like

Check your optical mouse. Clean it. Also try plugging in another mouse. Sometimes this is the culprit, not autocratic Microsoft. I had a spare mouse and keyboard plugged in which I had forgotten about. Unplug them.

For good measure, I found these values in the Registry needed to be changed through Regedit:

HKEY_CURRENT_USER
Control Panel
Desktop
ForgroundLockTimeout - decimal value 2000000 (or perhaps Hex code 00030d40)

HKEY_CURRENT_USER
Control Panel
Mouse
ActiveWindowTracking - decimal value 1

Rebooting doesn’t even seem to be necessary but do it anyway.

I no longer have this problem.

EUREKA!

2 Likes

This is still happening in windows 10 is there anyone out here that knows how to rid of this? I’m ready to throw computer through window! :stuck_out_tongue_winking_eye: please help.

Justin Cram
DyingJedi

1 Like

There is a totally different way to fix the focus stealing problem. Instead of preventing focus stealing, (Which MS says they won’t do) simply disable the keyboard when focus is stolen, until the next mouse click. That should be doable in one place, in the keyboard driver, and it should please everyone but someone too lazy to click a window they launched. The rule could be, if there has been a key stroke since the last mouse click, then disable the keyboard if focus changes, until the next mouse click. Exeptions for alt-tab.
It is usually the unwanted keyboard input that is the problem that needs solving.
Optionally, beep when the keyboard is disabled. I would pay real money for that utility.

2 Likes

It is funny you mention this @smrg because I just had something steal focus the other day (in Windows 10) and perform an operation I didn’t want because I was typing and pressed enter :scream: – I don’t think there’s ever been a real solution other than making important actions (things you can’t undo, like delete this whole drive) a double confirm… or make everything undo-able …

1 Like