Has this ever happened to you? You're merrily typing away in some application, minding your own business, when-- suddenly-- a dialog pops up and steals the focus from you.
At best, your flow is interrupted. You'll have to switch back to the window that you were using, figure out where you were, and resume your work.
But it can be worse. So, so much worse. If you happen to be typing something that can be interpreted as an action by that dialog-- and remember, pressing the space bar is the same as clicking a button when it happens to have the focus -- you could suddenly and very much accidentally be in a world of pain. Like this poor, unfortunate soul, who recently posted a plaintive comment to my XP Automatic Update Nagging post.
Great news! Microsoft developed a solution to this problem! Microsoft's most talented programmer figured out how to make "Reboot later" mean "Reboot when user says reboot". It only took some tweaking to 1 line of code, 180 days for approvals from 80 managers, 80 resource files for different languages, and 18 days for testing in one of the languages. It worked.The programmer opened a SourceSafe^H^H^H^H^H^H^H^H^H^H^H Team Foundation window in order to check in the fix. An expert programmer, she was used to using the keyboard. She didn't click her mouse on the "OK" button, she just hit the Enter key.
The "Reboot now" / "Reboot later" prompt flashed so briefly, she didn't even notice it. She thought she hadn't pounded the Enter key hard enough. Looking at Team Foundation's "OK" button still waiting there for her to hit the Enter key to check in her work, she hit the Enter key again.
The check in started. The check in got killed while her workstation rebooted. There we remain today, with the check in half-in and half-out, unusable, with no good copy of the code. So that's why the fix was never released.
It's a perfect example of how stealing the user's focus can lead to catastrophic results if the user is particularly unlucky. Unfortunately, this burden falls heaviest on us keyboarders.
Another classic example is the IE download notification window, which loves to pop up, steal the focus, and tell you the great news: your download is complete! Oh, and your newly downloaded file is copying to its destination! Hooray! Unfortunately, this very same download notification dialog also contains a "Cancel" button. Guess which button just so happens to have the focus when this pops up? Why you'd want to cancel a download after it is complete is a mystery to me, but I've inadvertently pressed the space bar on this dialog more than once.
Stealing focus from the user is never acceptable. I can't imagine any circumstance where this would be desirable or even defensible behavior. Modal dialogs are bad enough, but this is even worse-- it's almost a system modal dialog, so self-important that all work must cease as the user is forced to pay attention to whatever earth-shattering message it urgently has to deliver. It's an extreme form of stopping the proceedings with idiocy. I'm not the first person to complain about this, of course. Fellow members of the "Don't Steal My Focus" club wrote about this back in 2002, again in 2005, and a few months ago. It's not exactly an unknown or new problem. So why do we have to keep talking about it and dealing with it? What gives?
The strange thing is, there are provisions built into the operating system to protect us from badly written, focus stealing applications. The ForegroundLockTimeout registry setting is expressly designed to prevent applications from stealing focus from the user. The OS silently converts that inappropriate focus stealing behavior into friendlier, less invasive taskbar button flashing, which is the subject of the ForegroundFlashCount registry setting.
I've seen this work. Most of the time, it does work. This setting is enabled by default in Windows XP and Vista. And yet, applications are occasionally able to steal the focus from me and screw up my flow. I'd say it happens a few times a week on average. It's perplexing. I'm wondering if it's because badly behaved programmers abuse the "Always on Top" window flag in a misguided attempt to get the user's attention. I suppose as long as there are bad programmers, there will be some unorthodox way they can devise to steal the focus from the user. At some level, sufficiently advanced incompetence is indistinguishable from malice. Maybe we'd have better luck educating programmers on the evils of focus stealing and, more generally, the futility of unnecessary notifications the user isn't going to read anyway.
But in the meantime, please don't steal my focus. I'm using it right now. Really. I am.
Here's the interesting part. It's not that it's just bad behavior, it's bad behavior that must also annoy a lot of people at Microsoft. I could probably come up with a list of at least ten windows quirks that must utterly annoy Microsofties - and yet they persist in the software for years.
This is really baffling to me. If it bugs you, then why wouldn't you fix it? Your customers probably hate it as well. You're knowingly making sub standard software if you don't.
Jacob on December 5, 2007 1:15 AMSome Linux desktop managers (Gnome and KDE, IIRC) have this annoying property:
1. Go to workspace 2.
2. Launch a slow, bloaty program that takes a long time to come up
3. Go back to workspace 1.
4. Do some other work.
5. Slow, bloaty program elbows its way into workspace 1 instead of 2.
The inferior Comcast version of TiVo, once a program has completed recording, will throw up the equivalent of a system modal dialog the size of a mattress informing you that recording is complete (and blocking whatever you're trying to watch). But that's one defect among many, many for this hateful piece of software.
Groove is also annoying; unless you select "suppress alerts", the task tray icon interprets any mouse move within 200 pixels (ok, exaggerated) as a request to list every workspace that has updated files.
That leads to another problem where programs have no settings other than "don't tell me about anything, even fatal errors", and "level 7 OMG STFU all possible debug messages". I'm looking at you, InstallShield. And Ant, to a lesser degree.
Scott on December 5, 2007 1:53 AMI call bullshit on your anecdotal story: why wasn't the local copy of the source code on the developer's machine still good? And if it was half checked in, then those files just won't be updated on the next checkin.
David Avraamides on December 5, 2007 1:54 AMOh, and Peggle, which takes an inordinately long time to load for a 2-D non-scrolling game, *stops loading* if you alt-tab away from it. Loading will only complete if it's in the foreground.
Scott on December 5, 2007 1:55 AMWe don't need no pop-up windows,
We don't need no modal box,
No focus-stealing bad behaviour,
Coders leave my apps alone,
Hey! Coders! Leave my apps alone.
Better question - where did all the work go towards allowing updates to install without requiring a reboot? There was an initiative on the server side to minimize that back in the early part of the decade during my days at MSFT. It seems like every other Vista update requies me to update. I'm left wondering if it's really about replacing files in use, or could they have given me the option to close applications while something restarts on the PC.
Colin Bowern on December 5, 2007 1:59 AMI second the issue with Gmail stealing focus multiple times while it's loading. This is extremely annoying and goes to show this isn't just about desktop apps, Web 2.0 is just as guilty.
Oran on December 5, 2007 2:04 AMSwitch to Mac OS X :-)
Bilgehan on December 5, 2007 2:05 AMRight, I was wondering about what's going on with this focus issue, too. It works like you said - OS mostly prevents stealing focus but sometimes it doesn't and when it doesn't and one is typing a disaster might occur.
I hope someday this is fixed for good because the problem is really annoying.
Once, I wanted to close a windows with Alt-F4, when another window came stole the focus.
She got what she deserved, and was killed. Nobody stands in my keyboard line-of-fire and lives to tell the tale :)
"I'm wondering if it's because badly behaved programmers ..."
It's not always badly behaved programmers. It's quite often badly behaved customers.
I speak from experience.
Can happen to mousers too - if you have''SmartMove' enabled (obviously, they made the reboot now button the default!).
Benjol on December 5, 2007 2:18 AMThis will keep happening on Windows, because Windows apps are in direct control of their... well... windows. Linux apps are just as obnoxious (Thunderbird is killing me...), but I can always override them from the window manager. Focus stealing is still allowed by default, though. Talk about misguided programmers.
Felix Pleoianu on December 5, 2007 2:20 AMFocus stealing has been the bane of my computer existence for a great number of years, and I have only ever had one question:
Who ever thought it as a good idea, and why????
Chris Mayer on December 5, 2007 2:24 AMMacOS X tends to pop to front much the way windows does. No change there.
I seem to remember that MacOS classic didn't do this. If a backgrounded app wanted attention it would flash it's icon in the application menu. For example, it would do this if it popped up a dialog box.
The only time an app would pop to front was when it launched. I don't even think that putting up a new window would pop the app to front.
Yet another reason why MacOS X is worse than MacOS classic. :-)
Andrew Trumper on December 5, 2007 2:26 AMPerhaps someone who uses a Mac (I don't) can confirm this, but it's my understanding that apps can't steal the focus on OSX. If this is true, surely it's been fixed at an OS level - which leads me to the next question: why does Windows allow apps to steal the focus? Why not just force apps to flash the taskbar instead? I've been burned by this many a time...
stuart on December 5, 2007 2:27 AMVisual Studio help suffers from similar problems. At times it decides the best course of action is to steal my focus while I'm typing in my search query - because it is loading online help!?. Clicking back on the input field clears your query so you have to type it again. While typing my query for the second time "help" decides to refresh the online help pane and steals my focus again...
I've learned to open the help window at the start of my day - and close it at reboot :)
Goran on December 5, 2007 2:34 AMI agree, focus stealing is incredably annoying.
If you start some application and then try to edit a word document or an email while you wait, the other application invariably pops up without warning in the middle of a keystroke.
Didn't AmigaOS get this right 20 years ago?
at least it's not modal.
Otvio on December 5, 2007 2:40 AMI actually catch myself screaming to my computer to "Stop stealing focus!!!" out loud sometimes. Web browsers especially seem to exhibit this trait.
Rik on December 5, 2007 2:41 AMI've cursed the programmers responsible for more than a few apps (and websites!) numerous times, myself. I just can't understand how they can think this is a good idea. I've actually experienced something similar to the situation you described with data corruption myself; it left me quite literally shaking with apoplectic rage when I found out.
I've lost work, typed passwords into the clear on public computers, the lot. Personally, I think anyone caught writing code that does this should have their crops burned and the land salted, be dragged into the street, flogged, shot, and then flogged again for good measure.
Sorry; kinda touched a nerve on that one. This sits on the annoyance scale just slightly above "system dialogs that you can't ever really close" and "system notifications that cannot be dismissed without opening the program."
Daniel on December 5, 2007 2:44 AMThe worst part is that the most common cause of these problems is the OS (and its utilities) itself, rather than some 3rd party coders using certain settings to get in your way. Generally, I can get rid of the more troublesome 3rd party software by using another program with less annoying behavior. Switching to Mac OS, on the other hand, requires so many hacks that possibly wouldn't work on my computer, or buying a new computer, so that it's not really an option at this point.
Vizeroth on December 5, 2007 2:44 AMStuart: see above. Windows doesn't "allow" applications to steal the focus. Windows can't *stop* them from stealing the focus.
Felix Pleoianu on December 5, 2007 2:49 AMHere's my example of completely unnecessary and very annoying focus stealing:
With my laptop I got Roxio CD Creator. It includes an update checker which runs in the background every now and then. The annoying thing is that when it goes to check for an update, it first pops up a focus stealing message "I need to check for updates!". And then, a few minutes later, "There are no updates right now!".
Totally stupid. I don't need to know when the program is going to check for updates, it should do that in the background without attracting attention. And when there are no updates, I don't want to know that too.
Many companies / programmers overestimate the amount of attention they need to attract from the user. They think that their software is the center of the world and that the user is interested in every little thing that the software does.
Jesper on December 5, 2007 2:51 AMHave you ever installed Norton Antivirus? I does an even worst thing than stealing your focus, it pops up window like this:
"Click OK to restart you computer"
The problem is that the damn window just have the OK button.
I just dragged the window to a corner once and left it there... guess what.. forgot about it.. and when I was doing a very important thing and didn't save, the window just stole the focus and acidentally I hit Enter... the computer restarted and I lost some work -_-
Fabio Gomes on December 5, 2007 2:56 AMI think this annoying problem should be solved by OS, if any active window is getting keystrokes, it should not lost focus within a timeout.
In urgent cases, modal forms may be started displaying transparent and inactive, then get opaque slowly and finally activate if there are not any keystrokes.
Moosty on December 5, 2007 3:01 AMI say boycott apps that steal focus! (Though I haven't managed to put all my money where my mouth is yet.)
Internet Explorer
RSS Bandit
Google Earth
I say boycott apps that steal focus!
Internet Explorer
some people can't live without IE namely the Microsoft die-hards.
gogole on December 5, 2007 3:14 AMThe most annoying case of focus stealing I can think of is Live Messenger. I often start it while doing something else as it takes some time to start. SUddenly it steals the focus. I then restore focus to the app I was working in... and it steals the focus again!! And if you are so unlucky that you have any offline messages waiting it will steal the focus a third time.
At least there are no fatal results from typing with Messenger in focus.
Morten Christiansen on December 5, 2007 3:16 AMStealing is bad and blah, blah, blah, but ... Do you know that the 90%+ users of windows will never reboot (or do anything, no matter if the taskbar is flashing or a new icon appear in the tray bar) unless they are forced to?
I guess MS was forced to this solution by "security" experts, because the previous version was not like that.
another reason not to use windows...
and especially not internet exporer!
I'm amused to note that every example in Jeff's post (and several in the comments) is a MICROSOFT product. The auto-update thing. The IE download window. Visual Studio. You'd think that they'd send a company wide memo at some point saying 'No app shall steal the bloody focus!'. Or something.
Sigh.
Michael Kohne on December 5, 2007 3:27 AMI have extended "OK-itis" with that Automatic Update dialogue.
When it comes up, I reflexively type Alt+Space C Return net stop wuauserv Return exit Return to open a command prompt with Launchy and nuke the reminder from orbit.
Jonathan Buchanan on December 5, 2007 3:34 AMThis has happened to me too many times, my least favourite one though was where Automatic Update would pop up a dialog that was a 5 minute countdown to a reboot.
I often disappear from my computer for a brief period which was always longer than 5 minutes, leaving my computer exactly as is, and not hitting Ctrl-S on the way out, which means by the time I got back to my computer I had lost all my changes.
Ok this is probably my own fault to some degree, but I was usually thinking about the problem and would normally come back with the solution and then have to start from scratch again. And there was usually a good reason for not saving changes.
At least they have seen sense and stopped this one, well at least on my computers!
And I agree with Goran, VS help is really annoying.
Rob
TheProblemWithProgrammers on December 5, 2007 3:37 AMIf you can't imagine a message so important that it should take the foreground, you're not trying hard enough.
Chris Marshall on December 5, 2007 3:42 AM"Do you know that the 90%+ users of windows will never reboot (or do anything, no matter if the taskbar is flashing or a new icon appear in the tray bar) unless they are forced to?"
Surely a toast notification that doesn't go away unless explicitly dismissed would go most of the way? People still don't restart if it pops up in front of them anyway, they just click "Restart Later" because they're in the middle of something. Then they forget. Then they do something else and it pops up in the middle of it again.
I have to say I've not really been bitten by attention seeking apps that much recently. Maybe I've just become immune to it and so haven't noticed.
Raymond Chan has an amusing story about two apps that *really* wanted focus, so every 5 seconds made sure they were on top. Run them together and they would flip every few seconds.
[ICR] on December 5, 2007 3:49 AMWell, the Windows update notification functionality is a prime example of how not to implement a notification system.
First, it has the behaviour described in your post, and it also has _no_ way whatsoever to control it. You can only tell it to restart now, or "later". What does "later" mean? In this case, about 10 minutes. And then it's the same story all over again.
In Vista this is a little bit better. But not much. It's still the same principle. You can now tell it to remind you up to 4 hours later. But still not "Never!". I really don't see why...
Ubuntu does it quite well. It just says "You need to restart your computer for some of the changes to take effect.". That's all that's needed really. Why shouldn't the user be capable of restarting the computer herself?
All in all, there are extremely few cases where this functionality even is motivated at all. I wonder what they thought when they implemented it.
Adam on December 5, 2007 3:50 AMYou can disable focus stealing with TweakUI. I used this to "fix" two applications I use at work that were constantly fighting to steal focus.
Josh on December 5, 2007 3:51 AMAcrobat used to steal focus on OSX...
Sort of related, OSX and Windows both handle shutting down in completely opposite but both completely annoying ways: OSX, it's too easy for an application to cancel the shutdown process with a stupid question or taking too long to close. Windows, once you have started the shutdown process unless you are quick with Command Prompt, there is no stopping it, no matter how many apps are open and whether or not they have saved their progress.
chris on December 5, 2007 3:53 AM"sufficiently advanced incompetence is indistinguishable from malice"
Hah! That one's going in my personal quotes list. Beautiful update of Arthur C. Clarke.
This is another example of what drives me crazy about Microsoft products. You have some behavior that everybody agrees is bad. Microsoft finally says, "OK, it is bad, we'll fix it". They "fix" it, but it still happens a lot. Several Windows versions later, we take it as a win if it happens rarely instead of all the time. Arrrggghhhh...
A. L. Flanagan on December 5, 2007 3:54 AM" With my laptop I got Roxio CD Creator. It includes an update checker which runs in the background every now and then. The annoying thing is that when it goes to check for an update, it first pops up a focus stealing message "I need to check for updates!". And then, a few minutes later, "There are no updates right now!". "
My Logitech Mouse software does the same thing.
Rik on December 5, 2007 3:56 AMI/ think it should be legal to kill the entire project team and it's family to the third degree for eveery single app that exhibits that kind of behavior. and i'm stating it softly.
kris on December 5, 2007 3:57 AMSomeone already wrote a post about this...
I agree, it is very annoying!
Jeff on December 5, 2007 4:00 AMX hasn't been mentioned yet, so I thought I'd mention it.
With X, the application which gets focus is down to the X server, not the application. The window manager generally acts as guardian of the focus - deciding whether or not windows should be given it.
This works beautifully in, for example, KDE, where the focus-stealing problem simply doesn't exist.
I fear the only way to fix this in Windows is with a redesign of the way windows are handled which would break all existing applications, so don't expect to see a solution in the next couple of decades.
@kris: A post your mother and high school teacher would be proud of.
David Dawkins on December 5, 2007 4:03 AMOther things I hate include popups telling me I have "little or no connectivity", "that my desktop has unused icons", "that a hacker is attempting to ...", "that there is a new version of java", etc. Why does every browser need to inform the user that they are "sending information over the internet" every time it detects a virgin home directory?
For reference, emacs has a nice ui. Everything is a fully search/copy/paste-able buffer. The minibuffer is modal but it only gets activated at the user's command. One exception is the slime debugger popup but that means things are hosed anyway. Another not-so-nicety is that activity in one window such as gdb or the minibuffer can cause a buffer in another window to be temporarily hidden - bad if you needed it for reference. All interfaces have their issues but the emacs ones are more like design tradeoffs. OTOH, popups stealing focus is truly stupid.
Sam Danielson on December 5, 2007 4:03 AMOne of the old MMOs I used to play (Rubies of Eventide) would log you out of the game if you alt tabbed, supposedly to prevent cheating. This was back in the days when web browsers on windows would steal focus back any time a script on the page reloaded.
I died so many times to those damn page reloads.
Mike on December 5, 2007 4:08 AMEver thought of choosing a window manager ?
David Ginger on December 5, 2007 4:10 AM"Windows needs to restart to finish installing updates"
.......HULK SMASH!!!
I'm like Jeff, I'll have 20 or 30 tabs open in Firefox, and windows will decide to let me know I'm going to have to read later, because some stupid update forces me to restart or face the focus-stealing dialog over and over and over and over and over.
And why do applications decide to steal focus MORE THAN ONCE while doing something.
We need to send this stuff to Microsoft. I only use Windows because everyone else is.
Matt on December 5, 2007 4:25 AMGoogle Talk, the least user-friendly desktop app from Google, throws a window in my face whenever someone wants to ping me. Live Messenger, on the other hand, simply flashes a window button in the taskbar.
AL on December 5, 2007 4:27 AMIE downloads stealing focus... that is one of the reasons I stopped using it. No other browser copies to a temp directory then moves the file. I've had IE kill far too many 1 gig+ files to deal with that ever again.
Akira on December 5, 2007 4:29 AMConsidering the major crook here is the automatic updater in Windows, a truly frustrating thing, I doubt the blame is to lay on third-parties or dismal programmers. It's most likely a concious decision based on the assumption that the end-user doesn't know what's best for him unless it's shoved down his throat.
For those living with it I can recommend the earlier post: http://www.codinghorror.com/blog/archives/000294.html
Can't say I've experienced this with Linux though earlier commenter Felix Ple#351;oianu seems to suggest it can be an issue for some. At the very least you don't live with the automatic updater and live messenger.
The root cause is really the basic assumption behind windows: That the user is always there, and he/she will always service the needs of the operating system rather the other way around.
You can see this even from when trying to install it: Windows has the neediest installer for any operating system today.
Give me twm any day.
The programmers can be bad ugly bastards, for all I care. If I use TweakUI and check on "don't let programs steal focus", and it still happens, Microsoft is to blame.
I lost count years ago of the number of times that I rebooted while writing an email or programming after a stupid reboot window from a driver, game, program or whatever installation poped up unexpectedly.
Also, why is it that 95% of the programs ask you to reboot when they finish installing?. Most of them don't even touch the registry or your DS or S32 directories, just copy some files in a folder, put a shortcut in the start menu, and that's it!
Bad programming, yeah, but Microsoft should be the one protecting us against it (yeah, wishful thinking, I know)
paketep on December 5, 2007 4:37 AMMaybe we could all chip in and buy Microsoft a decent SCM tool?
Matt v on December 5, 2007 4:43 AMI hate them both.... The only saving grace is that you can disable both features to prevent the reboot prompts! Every computer I use has Automatic Updates disabled (I'll install when I'm ready) and I make a ton of little setting changes to IE before I consider it usable (Disble Download Notifications, Do not search from the Address Bar, Diable Friendly Error Messages, etc...).
Zach on December 5, 2007 4:43 AMOf course, using modal dialog boxes isn't always A Bad Thing(tm) - sometimes, especially when you're responding to user input a modal dialog box is okay.
It's when focus stealing dialog boxes are spawned without any prompting from the user...
GMail now does this, actually. It jumps to the front when it finished loading. Incredibly annoying on my slow home connection; I tend to end up accidentally closing it half the time.
Robert Synnott on December 5, 2007 4:48 AMA somewhat related annoyance, and I'm not sure who's to blame (the OS or individual program): blinking cursors in text input fields (e.g. password), even though the window doesn't have focus. Multiple messenger windows tend(ed) to be bad about this. (Admittedly I'm a bad typist, so I don't neccessarily look at the screen when I type.)
Andy on December 5, 2007 4:53 AM@Daniel
There crops burned and there field salted.
Suddenly, finaly I understand what happend to Cartage.
They stole focus from the Roman empire ;)
paktep wrote: "Also, why is it that 95% of the programs ask you to reboot when they finish installing?. Most of them don't even touch the registry or your DS or S32 directories, just copy some files in a folder, put a shortcut in the start menu, and that's it!"
That's because they need to replace files which are in use. Windows doesn't let you replace application binaries which are being used by a running process.
I believe Windows uses the position of binaries in order to perform some optimisation (leave some code out of RAM but have the option to load it later?) but I'm not certain this is the reason - or the main reason - why you're not allowed to replace such files.
Um... no only does the focus not take over in OS X, but even in tabs in browsers in OS X. I can have a login box or alert in one tab and it will not override what I'm doing in the current tab. Ridiculous.
Adam S on December 5, 2007 5:02 AMHey Now Jeff,
I couldn't agree w/ you more. It happens often to me with outlook reminders I get frustrated.
Coding Horror Fan,
Catto
AttatchThreadInput is usually abused in order to workaround the flashing taskbar intercept that Microsoft added to SetForegroundWindow
Mark Hutton on December 5, 2007 5:10 AM@David Dawkins: Get a sense of humour
Kris on December 5, 2007 5:10 AMLet us all say AMEN! Short of a catastrophic system failure, there is no reason for any application or system notification to steal the focus from the user. EVER. And Microsoft is often the worst offender.
Albert on December 5, 2007 5:14 AMIt drives me *nuts* when programs do this. At the very least, it should n't ever happen when I'm playing a game full-screen. I play EUO, a multiplayer online game based on the old Ultima games, and I'm tired of having my character killed and my quests interrupted because someone IMed me or my antivirus wanted to let me know everything is a-ok.
If I have an app running full-screen, it's because I want to give it my full attention. I'm really surprised Windows allows this.
Dave Ross on December 5, 2007 5:15 AMMore applications should be like Firefox... when you go to download a plugin it makes you wait 3 seconds before you click ok, and the download boxes have to be moused to (or wait 3 seconds) before you can accept the download.
Arron on December 5, 2007 5:18 AMThe stolen focus is annoying...
But what about those stupid messages saying "System will be restarted in 5 min"? What about if you got up from your desk and left your computer working on any heavy task? When you are back... system restarted and work lost.
Work lost = time lost = improductivity = expensive O.S.
People used to get random bits of code over AIM from me occasionally. Other people weren't as lucky, like one who sent his berpassword (as everything at University used the same password) to a random friend.
I think the problem is that programmers hate timeouts because they make things more complex. So code doesn't get written to worry about these things.
sapphirecat on December 5, 2007 5:27 AMAkira, you're absolutely right about IE downloading to a temp folder and then copying it. Yes, its focus stealing behaviour here is not acceptable, but the real problem is that it shouldn't need to present that notification in the first place. Just do it the way Firefox does it, and download to a temp filename in the selected directory, and then rename the file when the download is complete. This is item #1 on my "Why I don't use IE" list.
David on December 5, 2007 5:34 AMThis is my ABSOLUTE biggest pet peeve with graphical OSs. In fact, it's the main reason I went all Mac for my work about 4 years ago. It still happens in OS X but it's very rare and it tends to be appropriate - unlike Linux at work
To see this sort of end user notification and feed back down right, see Growl. It's absolute genius and deserves to be in the core of OS X and mimicked by everyone else:
http://growl.info/
paul
paul on December 5, 2007 5:42 AM"Leave me alone!! I'm reading Coding Horror!!" I pressed the "restart later" button. Oops. This IS the blog. Silly me.
PaulG. on December 5, 2007 5:46 AMYeah, I was about to second the mention of Growl on OS X in regards to the fellow mentioning Adium (my IM client of choice http://www.adiumx.com ) popping stuff up...
Ethan on December 5, 2007 5:48 AMI have a couple applications that steal the focus repeatedly during startup. One has a splash screen that steals focus to tell me things like "Loading DLLs" and "Loading scripts" and "Loading preferences".
Designers may steal focus for their dialogs because they've encountered dialogs that get behind the main application window and can never be accessed again. Too many times I've killed a "non-responsive" app to find a dialog hiding behind it. My team even wrote one of these back in PowerBuilder days.
Splash screens are another evil. Lotus Notes has one that's Always On Top, can't be moved, can't be sized. I really want to sit and stare at this thing for half a minute. Not.
Jim on December 5, 2007 5:59 AMPet Peeve: The Google home page, best designed page on the internet, etc., etc., will internally steal focus inside your browser. If you are typing in the address bar while the Google home page loads, the last half of your url will get entered into Google. It's rather frustrating.
Joel Eidsath on December 5, 2007 6:07 AMI've never thought about it before, but is this why the "OK" button on Firefox download dialogs is disabled for the initial few seconds? So you won't mistakenly hit enter right away?
Dustin on December 5, 2007 6:15 AMI just wish the reboot now or window had a "NEVER ASK ME EVER F**KING AGAIN" checkbox. Because, ya know, I'd check it.
Have you ever installed Norton Antivirus?....acidentally I hit Enter...
the computer restarted and I lost some work -_-
So use the free Grisoft AVG anti-virus software. It never does that, it never seems to require a reboot, and it's free. (I've had viruses in the past which have caused less damage than I've heard Norton causes!)
Jeff, I've noticed this trend more frequently on websites as well. The classic "Welcome Ad" redirect, or an advertisement that "expands" over the text you are trying to read.
In my book the worst offender is the "online survey" You're in the middle of doing something, and the survey interrupts you to ask how "usable" the site is...
Brian Vander Plaats on December 5, 2007 6:21 AMCommenting anonymously, but I have firsthand experience of how decisions like the reboot dialog get made at Microsoft.
Many people view security with an all-or-nothing mindset, which is ridiculous. Either the computer is "secure" or it "isn't", and this argument is used to force draconian measures on the user because "otherwise they aren't secure" (see UAC dialogs in Vista).
When an security update is released, the "nightmare scenario" is that someone's computer is on, downloads and installs the update, but *never reboots* for it to take effect. To avoid that horrible, horrible nightmare the solution is to force a reboot whenever possible, such as 5 minutes of inactivity.
Thinking about it, what computers are up for days at a time? Servers. Which are configured by admins who want to decide when to reboot. Most users reboot nightly, and to be honest, given the speed of security update deployment, one extra day isn't that huge a deal. If they haven't been bitten yet they probably won't be. The tradeoff is not worth it, but "users must be secure at any cost".
AnonMS on December 5, 2007 6:25 AMstart - run - cmd
shutdown -a
be quick about it and you might just save yourself some pain.
Mac OS X and Focus:
Mac OS X can have dialog boxes that steal the focus and in fact insist that you must take care of them before anything else. Just like in Windows.
However, Mac OS X also has another trick where windows that require your attention are attached to the top of the main window that generated the dialog box. The most obvious example is the print dialog box or the save dialog box. These dialog boxes also don't prevent you from moving or minimizing the window of the application either.
The problem in Windows is that dialog boxes that need your attention can get hidden by the window that generates them unless you steal the focus. I've used one or two applications where the main window is on top of the dialog box, and I cannot move or close that window which means I cannot close the dialog box that is locking the window.
So, bad programs in Mac OS X can steal your focus, but at least Mac OS X offers developers an alternative and better behaved way of handling the dialog box. I was actually surprised that this feature wasn't incorporated into Vista.
David on December 5, 2007 6:32 AMWell, to at least get rid of the auto-reboot feature, and probably that dialog - it can't hurt to hit up the Group Policy Editor
Hit Start-Run - gpedit.msc
Then head to Local Computer Policy - Computer Configuration - Administrative Templates - Windows Update
Set "No Auto-restart for scheduled Automatic Updates installations" to ENABLED!
I'm cool with Automatic Updates, but there are some more tweaks here in that panel, so you can customize to your liking.
Gee, why was that buried?
krhainos on December 5, 2007 6:40 AMWhoops. Missed a step. Administrative Templates - Windows Components - Windows Update.
You need a 'preview post' button. :
krhainos on December 5, 2007 6:41 AMUgh, at the company I used to work for we used HP (Formerly Novadigm) Radia software management err... software.
It has this fantastic behaviour on laptops where upon the first network connectivity of the day, it'd begin to check (silently, in the background) for updates to the software catalogue.
If any of those updates required a reboot, it would display a prompt going something like "Radia needs to reboot your computer to complete the software update [OK] [Cancel]", with OK default selected. Ofcourse, unless you knew the specific signs to look for (msiexec processes spawning in quiet/silent mode for instance) - you never knew to be aware that an update was downloading/installing.
The shutdown process that it used was one of the more direct methods too. So, if you are like me and tend to stay logged in for days/weeks at a time and quite often have dozens of applications open simultaniously - you know the way Windows responds when it suddenly has to load all these paged applications off the disk. Combine that with a half-dozen "Do you want to save this?" requests - there was simply no way to ensure you were saving/not saving the correct things before suddenly all running foreground apps were killed and the session logged off.
I've lost countless hours due to the stupid behaviour of this software. Not necessarily in lost code - just time taken waiting for all your apps to open up again to where you need them.
Will Hughes on December 5, 2007 6:42 AMIt seems like chat/IM clients do this all the time. ICQ, GAIM, Pidgen and GroupwiseIM have all stolen the focus. I have typed all kinds of sensitive information including passwords into IM windows that open in the far corner of a multi-monitor setup.
There is probably a configuration setting for most of these that could change the behavior, but it shouldn't be the default in the first place.
geekcyclist on December 5, 2007 6:45 AMWow, if I haven't had the "stop stealing my focus" argument with iCal lately. This is probably one of the most annoying things about working with a mac.
I do want to be prompted when an event happens, but is prompting the ONLY solution? With iCal, if you desire to be prompted, then there is a focus stealing, non-minimizable alert box that pops up in front of whatever you are doing and will not go away until you click on it. You can move it, type behind it, etc, but it still sits there and interrupts your wokflow.
I personally like how Outlook alerts of new messages - a customizable, slowly fading and appearing in a non-critical area of the screen. Even a taskbar item that begins flashing or wailing would be better for me.
Josh on December 5, 2007 6:45 AMI live with Lotus Notes. It pops up calendar reminders for when meetings are going to occur - useful. It grabs focus - infuriating. I type fast; I don't see my calendar reminders. Suffice to say it is one of the major bugbears with that. And Notes is not alone...
But you knew that - you'd read the article.
Thanks, Jeff.
Jonathan Leffler on December 5, 2007 6:45 AMNobody has mentioned my favorite offender: Outlook. It forces itself to the front at least twice during startup. WTF. My email and calendar are not so important that I need to be forced to look at them. I will look at them when I'm ready, thank you very much.
(Yes, I use Thunderbird for most mail, but I have to use Outlook for the company calendar.)
Spencer on December 5, 2007 6:48 AMmoral of the story: don't use windows
ryan on December 5, 2007 6:51 AMOh how i have had this a million fscking times, or leaving the computer overnight to come back to it rebooted and me going "where did my code i left open go!?!"
windows is no longer installed on this computer and that was a major reason why! damm you microsoft!
Trophaeum on December 5, 2007 7:00 AMI can think of one case where focus stealing is acceptable, even desirable: http://en.wikipedia.org/wiki/Lp0_on_fire
Roman Pearce on December 5, 2007 7:02 AMI've been complaining about this for years. On Windows, when you starting an application, like Word, then switch to another while the application loads, Word steals focus when it finishes.
This is severely annoying. I don't remember Gnome ever doing this. I'm using a Mac now, and it doesn't steal focus, except for Microsoft applications like Word and Excel.
Gah!! It's so frustrating.
Thanks, Jeff, for making me feel validated.
mike on December 5, 2007 7:05 AMAnyone tried to use the "stay on top" attribute to the window you do not want focus to be stolen from ? There used to be a "Nail It" program for Win98/2k to set this attribute for any window at will; but I am now away from it all and blissfully using OS X (for the past 3 years).
BlogManiac on December 5, 2007 7:09 AMUnfortunately, those in charge of the Firefox update download dialog need a lesson in this. More than a dozen times I have been typing something into a web form and the dialog displays. When that happens, I press the space bar before I know what is happening. The end result is that Firefox begins downloading its new version and installs it. It's a great tactic to make sure the browser is kept up to date, but it makes me want to do my best to disable update checking in its config. Has the opposite effect of what it's supposed to do, really.
Christopher on December 5, 2007 7:11 AM@Rick Hemsley
Sounds like KDE got it right.
Unfortunately the GTK developers (or is it Gnome, I never really know who to blame) don't understand, don't *want* to understand, that this is important. Focus stealing comes up occasionally on the GTK (Gnome?) forums, but there just isn't any acceptance that this really is a problem that needs to be fixed in the platform itself, not in every single application. The existing "focus stealing prevention" setting doesn't work. I don't remember that this was ever a problem when I used twm or ctwm or fvwm...
Pelle on December 5, 2007 7:13 AMThere's a really simple solution to this annoyance:
1. Steal the focus with your dialog box.
2. Don't focus any of the buttons (and make sure enter doesn't do anything).
3. Wait 2 seconds.
4. Focus one of the buttons.
Then there's no way anyone will accidentally press spacebar or enter and make a mess of things.
Steve
Steve on December 5, 2007 7:16 AMThe single worst offender on my Vista and XP machine(s) is the Apple updater (Safari, Quicktime and iTunes)! And why can't I update Quicktime without installing iTunes? There is not a single pop-up, updater, etc that is as offensive as the Apple updater in my opinion. You MS bashing, Apple lovers make me laugh... while they still don't advertise their products on the basis of the feature set, functionality, etc... at least they have changed their ad campaigns from being based only on bashing their competition. Probably because Leopard is throwing 'blue screens'!
Bill on December 5, 2007 7:19 AMOh, focus stealing can be worse than that.
http://bash.org/?4848
The comments to this entry are closed.
| Content (c) 2011 Jeff Atwood. Logo image used with permission of the author. (c) 1993 Steven C. McConnell. All Rights Reserved. |