Please Don't Steal My Focus

After waking from sleep mode in Vista, it seems a process is stealing focus from Office context menus and my start menu. Thing is, it’s not one of the processes on my desktop, that’s for certain, and my menus sometimes disappear before I can even hover over them. Aaargh!

Stealing focus from the user is never acceptable. I can’t imagine any circumstance where this would be desirable or even defensible behavior.

That says it all. NEVER ACCEPTABLE. NEVER… How hard is that to hard code into the OS? User sets focus – NEVER override.
HOW can this be said clearer so that OS developers understand? Can someone translate into Chinese, maybe? lol

The focus stealing behavior has always driven me crazy… I did finally find a solution that at least makes it a little less annoying - a small app called Deskpins. It’s not a perfect solution since it doesn’t get at the root of the problem, but at least it allows me to type in this window without fear of accidentally cancelling the scanning I’m doing.

By the way - if anyone involved in writing the MP Navigator EX software for Canon scanners is listening - please fix your product!

AVG Antivirus is also very bad with focus stealing. Every few hours to every couple of days it will pop up a big window that steals focus, and has absolutely no controls in it - all it does is tell you it’s updating. Then, 30 seconds later, another box pops up saying it finished updating. Just to tell you it’s done. Even worse, if you’re in a fullscreen game, it flickers on the screen and as soon as you click your mouse on it it minimizes.

Do you want another example of self important bloated ego of an application, that thinks it should steal the focus from whatever the user is doing for momentous events such as… finished commits that were put in the background? IntelliJ, the Java IDEA from Jetbrains!!! Can I rename it officially to SupidiJ?

Here is the bug report… unfixed since 2005…
http://www.jetbrains.net/jira/browse/IDEABKL-3849

What’s worse: Not fixing focus-stealing bugs after years. The latest version of Pidgin still steals focus, and they’ve known about the problem since early 2007 at least (based on Google searches).

as mentioned somewhere in the comments, use a desktop utility like DM2 to make the window you’re working on set to be Always on top.

http://dm2.sourceforge.net/

… for some (not so) odd reason, I’ve been repeatedly clicking the Restart Later button in the image in the post and being someone puzzled that it would not go away…

I have confirmed that Lotus Notes changes the registry once the program starts. The ForegroundLockTimeOut dword is changed to 00000000 from 00030d40. I’ll have to create a batch program that runs after Lotus Notes starts to reinsert a fixed dword (back to 00030d40).

Firefox 3.0 is good and ie7 also nice. We do not need pop ups and other stuff which do not allow them.

The automatic-updates reboot question can be disabled easily by making this into a .reg file and merging to registry:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU]
RebootRelaunchTimeoutEnabled=dword:00000000
NoAutoRebootWithLoggedOnUsers=dword:00000001

I am glad to post my views and points in this blog, Blogs are becoming the main source of knowing about things certainty,its importance,idolizing,either in a marketing way that one can differentiate. I enjoyed to be at here because one of my point has been cleared here.

I’ll add something else about Outlook to the pile: Double clicking on the “new mail” icon in the corner opens Outlook, but instead of going to my IMAP inbox (where the new mail is waiting), it displays it for half a second before switching to the unused and empty Inbox of “Local Folders”. Not exactly focus-stealing, but there’s a REASON I leave local folders collapsed.

This just happened to me and I got on google to see if anyone else was angry about it. Misery loves company… :slight_smile:

Fourth comment at the top reads:

Switch to Mac OS X :slight_smile:
Bilgehan on December 5, 2007 2:05 AM

That’s the biggest BS I’ve ever heard. Mac OS X has focus stealing behavior in its Apple iMovie, and recently, I’ve been bugged by the damned EPSON ASSWADS with their skillz in UI writing. Their driver has this amazing window which offers NOTHING but ink levels (they call it a print monitor - monitoring what?!) and it is so god damned annoying it’s not even funny. It pops up ALL THE FREAKING TIME while the printer is doing its job. It doesn’t matter if you minimize it or whatever, it just steals your focus. I don’t know who was the retard who thought focus stealing is a helpful behavior in any of these OSs on the market, but screw him/them/her, that’s the worst fu*#&$)@# concept ever.

From the developer’s side:

In C# on Windows it is not easy to tell if your application has focus and therefore ‘safe’ to bring up a dialog. E.g. this guy is having similar trouble to me,

http://www.eggheadcafe.com/conversation.aspx?messageid=32196873&threadid=32196873

I ended up checking this bunch of stuff, which is far from perfect but seems to mostly work. Posting here in case anyone has a better suggestion,


private bool oneOfOurFormsHasFocus(Form parentForm)
{
if (parentForm != null && parentForm.ContainsFocus) return true;
if (FormMain.ActiveForm == null) return false;
try
{
if (FormMain.ActiveForm.Focused || FormMain.ActiveForm.Modal || FormMain.ActiveForm.ContainsFocus || FormMain.ActiveForm.TopMost)
return true;
else
return false;
}
catch
{//probably illegal cross thread check
return false;
}
}


Also, a related issue of windows and modal dialogs staying topmost until you close them even when I remote desktop to another box (Windows XP). And I was the coder at fault in this case. Posting here in case useful for others… In C# use this.BringToFront() at runtime rather than this.TopMost = true. And if you are calling the dialog with ShowDialog(this) then you don’t need it at all.

Hope that’s all useful stuff.

Great post on “insecure” software who always need your attention.

I do wonder however, if IE7 already fixed the download thing with their non-intrusive notification bar? Have been using FF almost exclusively.

Lotus Notes does this too and really annoys me. It happens when a meeting notification or reminder pops up. Now this is a good idea because I’d probably miss all my meetings otherwise, but if it is going to pop up, why not disable the input for a second or so to give the user time to see the pop-up. It has happened to me time and time again. I have been happily typing away and then the pop up comes … and goes with out me seeing what it was. So I have to then go to my calendar and then my to-do list to try and figure out what the pop up could have been . And by the time I have done that, I forget what I was writing about in the first place!! And then there are times when there is more than one notification in the same box, but I don’t know this until I get a call asking why I’m not at a meeting! A bit of common sense is all it takes in these situations to get the point across and not mess the rest of my day up! At least this doesn’t reboot the machine though! I’ve got to agree though, the Restart Now/Later is the worst. Happened to me last night - bought something on the web and had the receipt page in front of me. Asked to restart now/later and chose later as I wanted to print my receipt. But then I had a problem with the printer, so I ran upstairs to sort that out and when I came back the machine had rebooted by itself, due to the countdown timer, which is the worst part of that dialog. OK, I need to reboot and ask me if I want to if you like. But don’t automatically reboot if I don’t answer after 5 minutes!! I’m obviously not paying attention, doing something else and I might just have something of worth on my screen at the time. Now I have no receipt for my purchase :frowning: Not good.

Yes it is annoying when someone steals the focus. For example when I start Windows and launch 2 applications, the other application shows up first. That is ok, but then just as I went into flow, the other application shows at the top of the other. That is quite interrupting, even though the applications don’t take ages to start.

Some applications have even some focus bugs. For example that when the application has finished downloading an update, the confirmation dialog shows up behind the application window and I have to find it from there when I have used to that all confirmation dialogs do show up in front. Also some confirmation dialogs throw me out of fullscreen games.

One point of view about focus is distraction. If the software is so bad, that you have to search modifications, fixes, or manuals for it, you are distracted from your work. And if I don’t find what I am looking for or the mod doesn’t work, I get frustrated and start searching for feedback channel. If I don’t see any feedback channel either, then I start to burn my nerves and need to calm down. And finally, when I send the feedback and nothing happens, that doesn’t look good either.

Bilgehan wrote “Switch to Mac OS X :-)”

I did. It may not steal the focus too much, but I’ve still had to reboot for a lot of software updates. Not so much in the last couple of months, but it was about once a week at one point between iTunes and system updates.

I thought OSX dialog sheets were stupid at first, but then I realised you could move the window below them unlike many Windows apps. On the other hand I sometimes want to move the sheet dialog.

I also wish the Cocoa buttons with spacebar focus were more distinct looking from other buttons.