[Usability] Error dialogs (among others?) and focus stealing prevention



Hi all,

Focus stealing prevention has been reenabled in CVS HEAD for metacity.
 Roughly, it means that if a window was launched at time A, and the
user interacted with a different window at time B, and B>A, then the
launched window will not be focused when it appears.  This allows a
user to work with an application while impatiently waiting for that
really slow app (*cough* OpenOffice *cough*) to show up without being
interrupted mid-thought when it finally does.  It also prevents those
annoying Instant Message windows from taking your keystrokes and
sending them to someone when you meant to be typing them into the
application window asking for your root password.  There's a couple
small bugs with it (#149028 for the curious), but it mostly works
right now.  I do have a usability question related to this feature,
though.

First, some background.  It has often been the case that error dialogs
will appear and the user will accidentally dismiss them before getting
to see them.  This is because the default action is to close the
window and the user may be typing when the window appears and hit
Enter before they realize that there's a window with a message to
read.  Focus stealing prevention will prevent this from happening *if*
the error dialog is from a different application than what the user is
typing in.  If the error dialog is from the same application, it will
often steal focus (but not always--depends on when keystrokes are
processed relative to the gtk_widget_show() and the window manager
mapping...blah blah blah.  Yes, Bryan, I wrote a test application to
verify this).  The fix is relatively simple--have the application call
"gtk_window_set_focus_on_map (error_dialog, FALSE);" before showing
the error dialog.

Now, my question(s):  Under what other circumstances should we be
asking application authors to request a window to not be focused on
map?  Alerts as well as error dialogs?  Any others?  Are there cases
when error dialogs should be allowed to steal focus on map (e.g.
perhaps if it is launched _immediately_ in response to a user action)?

I'd like to send an email to desktop-devel-list asking application
authors to fix various issues in order to support the spec.  This is
one of the things I'd like to cover, and I think I have the general
idea, but I'm worried that I'm forgetting certain cases and thought
I'd ask for comments first.  (I also have to wait until I can find
someone with a freedesktop.org cvs account that can commit the patch
in bug 151245 for me *cough*, but that's a different issue...)

Cheers,
Elijah



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]