Please Don't Steal My Focus

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…

Commenting 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”.

start - 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.

Well, 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?

Whoops. Missed a step. Administrative Templates - Windows Components - Windows Update.

You need a ‘preview post’ button. :

Ugh, 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.

It 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.

Wow, 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.

I 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.

Nobody 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.)

moral of the story: don’t use windows

Oh 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!

I can think of one case where focus stealing is acceptable, even desirable: http://en.wikipedia.org/wiki/Lp0_on_fire

I’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.

Anyone 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).

Unfortunately, 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.

@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…

There’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

The 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’!