This used to be a decent blog. Now its turned into another bash Microsoft for page hits blog. Enjoy your new ad revenue from the Reddit/Digg crowd.
Stealing focus is vital in online poker where you can be surfing etc but when its your turn to move the software pops to the front of the screen.
If not you wonât know when its your turn !
Apart from that apps should never steal focus.
The worst Iâve experienced for doing this was notification application for a music event. It stole the focus just after my bluetooth mouse batteries died. It stopped me from accessing the application for installing bluetooth devices nor could I save any of my programs. In my rage I repeatedly press the power switch and thus broke the case.
Another hate of mine is unnecessary system tray icons. They are usually the same applications that decide they should be started when the machine is booted up thus making it 5 minutes before the machine is usable.
Iâve been upset about this for a while. The Windows Update nag box is the biggest offender, though. I canât believe that Microsoft allowed it to work that way.
IM clients are another problem. Iâm not sure if itâs the use of the flashing task in the task bar or not. But, those new windows (especially in older versions of IM clients) would often pull you out of a full-screen application.
I can see when you may want apps to steal focus. But, I think that they should be allowed to do so only after you are notified of the first attempt and given a choice: âAllow this application to steal focus?â âAlways allow this application to steal focus.â âDo not allowâŚâ etc.
Stolen Focus:
Iâm typing away blissfully, and from the corner of my eye I see a window come and go, stealing my last few keystrokes. Even worse is when Iâm not sure which window popped up and what did I just tell it to do?
For the disabled PC user, every mouse click and keystroke can be a major effort or literal pain. So disabled users will often go to great lengths to automate repetitive tasks and minimize the steps required to perform each task. This includes the use of macros, voice recognition, mouse and keyboard utilities, and special hardware such as head-controlled mice and programmable button boards.
But in spite of these efforts, disabled PC users are often confounded by all-too-common problems found in todayâs Windows and Web applications.
Following are 20 problems with PC software that may be minor nits for many users but can be a huge problem for the disabled.
http://www.devtopics.com/pcs-and-the-disabled-20-molehills-that-become-mountains/
This is especially hilarious if youâre the kind of person who enjoys videogames, like me. Especially if the games you like are memory-hungry ones that provoke minute-long bouts of memory swapping whenever you switch out of them from fullscreen mode. I canât tell you how many times my IM application of choice has screwed over a game of Team Fortress 2 by forcing it to minimize out of the blue in favor of a one-line message from a contact. At the best of times, it results in spending the better part of a round just trying to get back to a playable state; at the worst of times, it takes the entire operating system down with it.
Tip from Simon Peyton Jonesâ site:
http://research.microsoft.com/~simonpj/win32-cheat.html
"Microsoft Powertoys is a bunch of small but useful tools. Ones Iâve used or had recommended include:
* TweakUI: a control panel that lets you alter aspects of the Windows user interface. The ones I like are:
o File-name completion in the cmd shell.
o Stopping popup windows stealing focus, so that your input goes to the new window."
Herrmann: Sadly, it doesnât do a good job at it. Even after installing TweakUI and toggling that setting, Pidgin still steals focus all the time.
Hey orange, this is for you:
Happened to my wife yesterday - she was trying to use the BART
website to print herself a one-day parking pass. She was using
an OSX 10.4 powerbook with FireFox and choose Save As PDF.
Unfortunately something went wrong with Firefox at that moment
and another modal dialog appeared.
This dialog unfortunately obscured the first one but for some reason
did not have the focus. She freaked out because now she couldnât
safely quit the application and she was afraid that she wouldnât
be able to get back to the site without having to pay again.
Luckily the number for her parking pass was visible on the screen
so she recorded that and called the help line.
I donât think this is a browser issue, and I think the only solution
is to insist that all modal dialogs implement the ESC key as Cancel.
The vi editor got this right 30 years ago: you should always be
allowed to press ESC to get out of whatever mode youâre in.
Focus-stealing is bad enough but ⌠Microsofâts source code control CORRUPTS FILES when the OS requests a restart in the middle? And no one sees anything wrong with this?
An OS restart request is just that: a request. Any app worth its salt should check the âdirtyâ state, pop up a âsaveâ confirmation (or if it is in the middle of a critical operation stall until that finishes), and wait for the user to hit âsaveâ AND commit everything to disk before telling the OS it is done by shutting down.
Iâve seen this work on Windows, so I know itâs not an OS X only thing. Itâs just bad programmers not properly reacting to OS messages.
As for those saying it doesnât happen on OS X: it does. Prime candidate is my workplace-required Norton Antivirus, which pops up its âlive updateâ window whenever and wherever it pleases. I also notice that ChronoSync occasionally âborrowsâ focus (it doesnât pop to the front, and the keyboard doesnât trigger its âAbortâ button, but it does interrupt the flow of writing for a word or two at a time, intermitently). Itâs just that most OS X developers use the less-invasive methods for getting a userâs attention (bring up an alert sheet which bounces the dock icon) âŚ
Anyway, back to the original topic: does IE still not care that you have a long missive typed in a text field when asked to restart? I know Firefox and Safari have long-since discovered that, more often than not, the thing Iâve been typing is relevant to me and I donât want to just shut down the app without submitting it âŚ
Disagree. I agree about the potential for damage. I was getting source one day (which takes forever). While typing happily away, my plug-in popped up and I happened to hit the letter commanding it to overwrite my local code wiping out some work.
I want a way to prevent these kind of actions, but I donât mind the pop-up itself. I canât do the task bar flash thing because I have mine hidden (I need the real estate). I tried to configure my meeting reminders from outlook to pop-up but theyâve made that impossible in the current version. I canât see the task bar flash and I often miss the sound because I have headphones plugged in that Iâm not wearing at the moment. So Iâm late to meetings.
Switch to GNU/Linux. Most window managers do a perfect job at focus stealing prevention ;). I use KWin ATM. No app has ever stolen my focus.
Mike P: âone time i had a massive query i had constructed for use the next day. that evening windoze did an update and rebooted so the query was gone forever. so much for automatic updates.â
Sorry, Mike, but if you took the time to write a âmassive queryâ to use the next day, and then walked away for the night without saving it first, that isnât a Windows problem; thatâs an incompetent user problem.
You canât blame âwindozeâ for your own stupidity. Blame Windows for the things it does wrong (like the dialog weâre discussing here). But donât blame it for what isnât itâs fault.
Brian: âTo everyone Bitching about the 5 minute forced restart. If Iâm not mistaken, this setting only applies if youâre receiving updates from an SMS Server, and the system policy is to force a reboot. If this is happening on your home computer then something is borked, as in all my years of using XP, Iâve never seen that.â
If youâre running XP and not seeing this, you have automatic updates turned off, or donât have an internet connection on your machine. Iâm using a fresh install of Windows XP Media Edition (which is XP Pro with a handful of media enhancements added) with SP2; until I found out you could fix this issue using Group Policy Editor, it drove me nuts.
elijan sejic: "Not good if you were wacthing that XXX torrent file you just downloaded.
And donât look me like that for using Norton - itâs a workstation at work."
So you were watching âthat XXX torrent file you just downloadedâ on âa workstation at workâ? Is that a terribly good idea? And does your employer know about this? g
MiddleMan: âThis used to be a decent blog. Now its turned into another bash Microsoft for page hits blog. Enjoy your new ad revenue from the Reddit/Digg crowd.â
I donât see it that way. Thereâs nothing wrong for criticizing MS for things it does wrong; the problem is with the âReddit/Diggâ and /. crowd that insists on bashing MS for everything, even things it has no control over (see my response above to Mike P for an example). Your post is another example of a totally ludicrous post (as bad in a different way as Mike Pâs), as you seem to think that MS is absolutely perfect and should never have a negative thing said about them.
However, if you feel that negative about Jeffâs posts here, Iâm sure heâll be glad to refund the membership dues that you paid in full, and you can simply delete the bookmark you have to codinghorror.com.
And Jeff? If the refund is an issue for you (like say you spent that vast amount you collected from MiddleMan already on your mortgage or something), drop me a note and Iâll chip in to help you out. g
Mike Time: "Stealing focus is vital in online poker where you can be surfing etc but when its your turn to move the software pops to the front of the screen.
If not you wonât know when its your turn !"
If youâre playing online poker, you should play online poker and not do something else. That way youâll know when itâs your turn, and wonât need focus to be stolen.
Besides⌠Are you suggesting that Microsoft somehow create an API call that can only be used by online poker games to steal focus, but not be used by other applications? How exactly would that work? Would the poker game have to register with MS in order to get the information about the API? If so, whatâs to prevent them from using the API in another type of application as well?
Or do we have the poker game creator get the gameâs name embedded into Windows itself, so that the kernel can reject calls to the API unless the game is on the list? In that case, what happens if Vista contains the list now, and tomorrow you create a new poker game - how do you get added to the list so you can use the API? Do you wait until the next service pack for Vista? What if youâve missed the deadline for that? Do you wait for the next release of Windows? Vista was only five years late.
You canât allow one type of program to do something that others canât. For instance, you canât let one video driver do something that all other video drivers canât do.
Peter C O Johansson: âI canât tell you how many times my IM application of choice has screwed over a game of Team Fortress 2 by forcing it to minimize out of the blue in favor of a one-line message from a contact. At the best of times, it results in spending the better part of a round just trying to get back to a playable state; at the worst of times, it takes the entire operating system down with it.â
As I said before and now say again, thatâs not Windowsâ fault. Itâs yours, for leaving your IM application running while you play such a resource intensive game, thereby allowing it to interrupt.
Itâs fine to hammer on MS and/or Windows for things they do wrong, but you canât blame your own screwups on them.
Tom Dibble: "An OS restart request is just that: a request. Any app worth its salt should check the âdirtyâ state, pop up a âsaveâ confirmation (or if it is in the middle of a critical operation stall until that finishes), and wait for the user to hit âsaveâ AND commit everything to disk before telling the OS it is done by shutting down.
Iâve seen this work on Windows, so I know itâs not an OS X only thing. Itâs just bad programmers not properly reacting to OS messages."
Well, youâre mostly right. g A well-behaved application will request a restart, and if any running process says âNoâ, the restart request is denied.
However, the Windows API does allow that request to be phrased as a requirement; thatâs done using the same API function (InitiateShutdown) with the SHUTDOWN_FORCE_OTHERS, SHUTDOWN_FORCE_SELF and SHUTDOWN_POWEROFF (and possibly the SHUTDOWN_GRACE_OVERRIDE) flags. That means that an ill-behaved application can force you to restart, even if you donât want to do so. I suppose this was done so that the OS itself could force a restart, but MS couldnât restrict it to only being used by the OS, as with some of the parameters it is quite useful from a systems/network administrator standpoint.
This is one thing unix has gotten right for over 30 years. Sloppy focus all the way!
This has always pissed me off⌠I dunno how many times iâve IMed my friends chunks of code by accident. The IM client Iâve been using the last couple years, Adium, has a preference for its incoming-message-focus behavior which has been helped keep my blood pressure nice n low =)
Imagine what ?
Yesterday I got a requirement to work on which talks about EXACTLY this. In fact, the requirement talks about implementing a new feature in existing application, that will pop-up a dialogue when user tries to query some data on the form. And what is the purpose of the new screen ? BingoâŚaudit user accessâŚand the icing on the cake is the new screen needs to be displayed randomlyâŚ
Sometimes, I really feel people think that computer is a magicianâŚ
KenW: If youâre running XP and not seeing this, you have automatic updates turned off, or donât have an internet connection on your machine. Iâm using a fresh install of Windows XP Media Edition (which is XP Pro with a handful of media enhancements added) with SP2; until I found out you could fix this issue using Group Policy Editor, it drove me nuts.
Are we talking about the same thing here? I was referring to the Forced reboot in 5 minutes. While I admit I donât have my home PC set to Automatically install updates currently, I canât think of the countdown for a forced reboot ever appearing. I only ever see that on my Work PC hooked up to the SMS server.
At home, my Automatic updates are set to Download, and notify, and I DO get the Updates have been installed, you need to reboot nag message.
So ⌠buy a Leopard
This and many more problems fixed âŚ
Scot, the âfixâ only works if the programmers let it work. Itâs enabled by default in Vista, and we still have problems with evil programmers deciding to steal the focus.