The community Taskforce initiative has now come to a close.
Thanks to everyone who made thoughtful and genuine contributions to the website.
All submissions will be kept publically available for the forseeable future for reference purposes.

This website is part of the community Taskforce initiative

Submission details

182 +200/-18 votes

Applications stealing focus

Submitted by Turbo on June 5, 2008 to Annoyance, Usability

I'm doing something. Another application decides I shouldn't, so it bumps to the front and grabs keyboard focus, to ask me something irrelevant to what I was doing (Usually an installer or some other long-running process asking me something obvious or informing victory/defeat).

To MS credit, first-party applications rarely commit this sin anymore, but I have to question why does the OS even allows this to happen. Only the windowing manager and the active window (or, more likely, the application that owns the active window) should have control over the focus.

The complete cure is two-fold.
The easy part: continue redesigning your applications that steal focus. Lead with the example.
The hard part: deprecate (and later remove) the mechanism that allows such behavior. If an application wants your attention, well, stealing focus is not a valid option any more.

High

Medium

Not fixed

Discussion (16 comments)

tino wrote on June 5, 2008, 4:28am

Oh yes, I forgot this one. So thank you for bringing this in! :)

eried wrote on June 7, 2008, 4:51pm

But windows protect from stealing focus already. The only problem if some apps that change this value (When I notice this behavior, I fix it with my Vista patched TweakUI)

cosmin2007 wrote on June 7, 2008, 6:57pm

hey, eried, can you please send me a link to your Vista patched TweakUI app ? (cosmin.tataru at live dot com ?

sauronreaver wrote on June 8, 2008, 1:26pm

I absolutely despise windows that have some sort of attention deprivation, keep em away from me lol

chaosblade wrote on June 8, 2008, 1:49pm

Highly annoying, But not exactly Microsoft's problem. Yes, I suppose you can remove the API that allows this at all. But you have to question if it IS needed somehow.

thenonhacker wrote on June 8, 2008, 6:47pm

Thank You!!! +1

firstparadigm wrote on June 8, 2008, 11:26pm

Occasionally I'll be typing something, and simultaneously a question dialog box will pop up and I'll answer it with my keypresses without a chance to see what I just did...

Urbane.Tiger wrote on June 11, 2008, 10:48am

I sometimes switch to X-Windows like behaviour, would not like to see anything done to address this issue impact on availability of X-Windows like behaviour. ie don't take it away from me

keff wrote on June 11, 2008, 1:38pm

Give examples. Since moving to Vista, I have seen no focus stealing app.
And anyway, it's nothing MS could change.

jono1 wrote on June 11, 2008, 3:10pm

Yes, yes it is. They simply have to disable the UI call steal_focus_and_piss_off_user();

rus.newman wrote on June 11, 2008, 11:36pm

Focus-stealing is such a pain, and is actually a *very* negative point in the school of HCI. I found, with TweakUI for XP, that if you disabled focus-stealing, this also prevented things like the Run window from appearing on top of other windows, after pressing Win+R on the keyboard. I thought I'd found the setting to cure all the pain, but actually it just introduced even more aggravation.

@firstparadigm: So true! It can sometimes be annoying that spacebar presses buttons for you, seeing as its one of the keys you're most likely to press when focus is stolen! Its often setup programs, too. You'll be typing away with a setup running in the background, the setup will finish, steal focus, you'll press spacebar and inadvertantly restart your computer. Same with Windows Update Restart dialog. ARGH!!

lawrencejob wrote on June 12, 2008, 9:46pm

The worst part is the accessibility. Say you're typing, and Windows Update pops up and asks you to restart, and what you're typing happens to contain the letter (N, from memory, which is inconsistent in a whole other way) that initializes a forced restart. That's just plain annoying.

el3ktro wrote on June 13, 2008, 4:34pm

Mac OS X solvs this pretty nicely imho. When a background program needs your attention, it's icon in the Dock starts to "jump". It doesn't steal focus at all, it just sits there at the bottom of the screening, jumping until you click it, but you can finish your current task first.

zoran wrote on June 14, 2008, 8:40am

This one is nasty indeed. It was there forever in Windows though. It definetly needs to be fixed for like yesterday. It's not only irritating, it can be very dangerous. Many times I'm typing an email, some window decides to steal focus right when I'm hitting ENTER, and boom! I see a dialog flash: I just gave the default answer to whatever question just popped up! This makes me curse like a sailor each time it happens. I even fantasize about suing MS for this.

eried wrote on June 16, 2008, 7:34am

Here is TweakUI, with this you can restore the stealing focus protection in Vista:
http://erwin.ried.cl//files/articles/_public/TweakUI2.rar

(I patched the XP version of TweakUI to run properly in Vista)

FutureMillennium wrote on March 6, 2009, 9:39pm

Yes, god, yes! This should NEVER be allowed to happen!
Unless it's a message box informing me about the inevitable end of the world or something similarly important, which I can't imagine ever happening in Windows!

You might also be interested in...