Re: how to focus on desktop automatically if no windows open?
- From: Shaun McCance <shaunm gnome org>
- To: Elijah Newren <newren gmail com>
- Cc: Bill Haneman <Bill Haneman sun com>, Gnome List <gnome-list gnome org>, metacity-devel-list gnome org
- Subject: Re: how to focus on desktop automatically if no windows open?
- Date: Fri, 11 Nov 2005 11:08:30 -0600
On Fri, 2005-11-11 at 09:31 -0700, Elijah Newren wrote:
> On 11/11/05, Bill Haneman <Bill Haneman sun com> wrote:
> > Elijah Newren wrote:
> > >It's the designated no-focus-window (a window created by Metacity that
> > >the user never sees but is around to ensure that global keybindings
> > >work...). That window can also get focused when certain bugs (e.g.
> > >X11's utterly stupid RevertTo behavior) are worked around.
> > >
> > I think that the presence of an invisible no-focus window may be an
> > accessibility violation (i.e. may violate '508' paragraph 1194.21c). We
> > might have to go to the explanatory "guidance" documents to be sure;
> > basically a "well-defined, onscreen indication" of focus must always be
> > present. Now, if there IS no focus, is the absence of a well-defined
> > onscreen indication a bug? Perhaps the absence of focus is itself a
> > violation, the correct interpretation is not immediately apparent.
>
> Okay, but that doesn't really help with the
> should-we-focus-the-desktop-or-not question. There is no real way to
> indicate that the desktop window has focus. Unless a "normal" window
> (e.g. not a panel and not the desktop) exists, there is no way to
> really comply with that requirement currently. So this seems to
> merely point at a deeper problem somewhere.
This seems to be the case with any icon view, or any non-editable
text view. It's not a problem inherent in WM_DESKTOP windows.
Rather, it's a problem with the type of widget desktops generally
happen to use. At least something will happen when the user hits
an arrow key or something.
For people using the keyboard intensively (including those using
it exclusively for a11y reasons), I think having focus go nowhere
is very rarely useful. That's pretty much the crux of my argument.
Having nothing focused means you have to explicitly Ctrl+Alt+Tab
before you can do anything. That seems to me like forcing users
to do something repetitively that the computer really could just
do for them automatically.
Your counter-case:
> Anyway the case: If a modal dialog to an app which has focus appears
> and the author explicitly requests that the modal dialog not get focus
> when it is launched, then the only sane choice for focus is the
> no-focus-window. Leaving the window that had focus with focus would
> be horribly misleading because the app will ignore keyboard input to
> that window. Focusing the modal dialog would be wrong because it is
> an unexpected popup and the user could accidentally dismiss the
> important warning/error it contains--or even worse, select an
> inappropriate action that they didn't want merely because they
> happened to be typing at the time when the window appeared. Focusing
> a different window on the screen would likewise be wrong because user
> keystrokes shouldn't be transferred to some other random application
> just because of the appearance of an unexpected modal dialog. By
> deduction the correct thing usability wise in this case is for
> "nothing" to have focus but to allow global keybindings (such as
> alt-tab) to work.
I really can't think of a scenario where I would consider that
application to be behaving nicely. If accidentally activating
the dialog (say I hit space, because I'm typing something else)
would do something bad, then maybe the dialog just shouldn't
have a default button. If the window never gets focus, how
would people with screen readers ever know it's there?
Anyway, that's something of a different case. We're just
talking about the case where there are no "normal" windows
on the screen. Maybe I just closed all my apps, or maybe
I just switched to a clean workspace. For keyboard people,
having focus go off into limbo just isn't very useful. It
should go somewhere, and preferably somewhere that isn't
some invisible pseudo-window. That leaves the desktop and
the panel(s). And how-to-get-focus-right.txt basically says
the panel is "harder" to focus, so the desktop seems right.
I'm not trying to push the desktop as the focus target when
weird stuff happens, like no-initial-focus dialogs coming
on-screen. Just this:
if (NoNormalWindows && NothingElseWeird)
FocusDesktop ();
It seems to me like a reasonable fallback. Don't put it in
the list of focus-getters for sloppy (that would effectively
turn sloppy into mouse focus). Don't put it in the Alt+Tab
or consider it in the recently-used window list. Just focus
it when all else fails.
--
Shaun
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]