After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 490668 - Something should have focus when Metacity is first started
Something should have focus when Metacity is first started
Status: RESOLVED OBSOLETE
Product: metacity
Classification: Other
Component: general
2.20.x
Other All
: Normal minor
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2007-10-26 22:22 UTC by David Price
Modified: 2020-11-06 20:06 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20



Description David Price 2007-10-26 22:22:25 UTC
Please describe the problem:
Current behavior: Immediately after login, nothing has focus.  This poses a problem for users of the Orca screen reader. If nothing has focus, then AT-SPI cannot capture key events, resulting in no actions taken if user tries to launch Orca-related dialogs, such as Preferences or Quit. Pressing the relevant key chords (orca-key + spacebar or orca-key + q, respectively) generates no response.  

Desired behavior: Some item on the desktop receives focus immediately after login. 



Steps to reproduce:
1. Configure Orca to start on login
2. In Orca Preferences, General Tab, uncheck box for "Show Orca main window"
3. Logout
4. Log in.
5. Press Orca-key  + spacebar (On standard external keyboard, Orca-key is NumPad-0; on a laptop, Orca-key is CapsLock)


Actual results:
Nothing. No actions, no speech.

Expected results:
Orca Preferences dialog box appears

Does this happen every time?
Yes.

Other information:
Current workarounds: (1) Press control-alt-tab to force focus to the desktop; (2) Press Alt-F1 to move focus to top panel, from which the Orca dialogs can be launched; or (3) use gnome-session-properties to add an application to the startup programs.
Comment 1 Vincent Untz 2007-11-12 23:48:23 UTC
Seems to be a wm issue to me since this has nothing to do with gnome-session.

Moving to metacity (I'm assuming you're using metacity)
Comment 2 Elijah Newren 2007-11-13 02:41:45 UTC
Interesting...but I don't see how this is a lack of focus issue since alt-tab works.  If it's truly the case that nothing has focus, then even metacity's keybindings should not function (see e.g. bug 147475).

How do the orca keybindings work?  Is this yet another case where not doing all keybindings the same way (e.g. through the window manager), rather than the current mess of sticking some in gnome-settings-daemon, some in the window manager, some in random various apps breaks things?

Maybe Dan or Matthias could comment, since they understand keybinding issues better than me...

(Oh, also, any issues about metacity focusing the wrong thing on launch are tracked in bug 88194; but this bug claims to be about nothing being focused or keybindings in orca not handling something at startup rather than the wrong x window having focus.)
Comment 3 David Price 2007-11-13 18:39:32 UTC
(In reply to comment #2)
> Interesting...but I don't see how this is a lack of focus issue since alt-tab
> works.  

Just for clarification, Alt-Tab has no effect.
Comment 4 Willie Walker 2007-11-13 18:50:18 UTC
To add more information -- I believe the initial login configuration David has is one with no windows are open and no applications are running (aside from the default things like the panel and nautilus for the icons on the desktop).  In this situation, there doesn't appear to be a client that is participating in the AT-SPI infrastructure, thus keyboard events are not being delivered to Orca.

I don't have any great ideas for what to do in this particular login configuration, but I suspect giving one of the desktop icons focus would probably be sufficient.

> How do the orca keybindings work?

Orca depends upon keyboard events to be delivered via the AT-SPI infrastructure.  The challenge we have with Orca is that it is a global thing that needs to be able to get keyboard events regardless of what application has focus or what window manager is being used.
Comment 5 Elijah Newren 2007-11-14 01:44:22 UTC
(In reply to comment #3)
> Just for clarification, Alt-Tab has no effect.

Then why did you state in your original report that:

> Current workarounds: (1) Press control-alt-tab to force focus to the desktop;

?

(In reply to comment #4)
> Orca depends upon keyboard events to be delivered via the AT-SPI
> infrastructure.  The challenge we have with Orca is that it is a global thing
> that needs to be able to get keyboard events regardless of what application has
> focus or what window manager is being used.

Sounds nasty.  We have way too many ways of doing keybindings and thus of hosing them.

Anyway, out of curiosity, is this bug duplicatable by also simply running
  metacity --replace
in a terminal?
Comment 6 David Price 2007-11-14 03:15:53 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > Just for clarification, Alt-Tab has no effect.
> 
> Then why did you state in your original report that:
> 
> > Current workarounds: (1) Press control-alt-tab to force focus to the desktop;

Sorry.  Call me ignorant.  I thought Control-Alt-Tab had different functionality than Alt-Tab.
Comment 7 Elijah Newren 2007-11-14 04:10:35 UTC
Oh oops, I misread; sorry about that.  Still, replace "alt-tab" with "ctrl-alt-tab" in comment 2 and everything still applies.  Some x window *has* to have focus for either of those keybindings to work.
Comment 8 David Price 2007-11-14 05:28:23 UTC
> (In reply to comment #4)
> Anyway, out of curiosity, is this bug duplicatable by also simply running
>   metacity --replace
> in a terminal?
> 

Sorry, should have responded to this one earlier... Unfortunately, I won't be able to test this for two and a half weeks.  I'm traveling and my laptop has Feisty, not Gutsy, and I don't want to upgrade it without a second machine around.
Comment 9 Elijah Newren 2007-11-14 05:36:33 UTC
That's fine.  Enjoy your travels.  :-)
Comment 10 David Price 2008-02-26 02:44:25 UTC
Sorry. Forgot about this one.

Running metacity --replace from a terminal does duplicate the problem (I've taken my login setup back to no programs running.) After typing the command, I cannot activate either the Orca Preferences or Quit Orca dialogs.
Comment 11 Elijah Newren 2008-02-26 02:47:48 UTC
Okay, you can't use the orca preferences or quit orca dialogs.  But you can use Ctrl-alt-tab to switch focus to another window, and then they work...is that right?
Comment 12 David Price 2008-02-26 03:01:40 UTC
(In reply to comment #11)
> Okay, you can't use the orca preferences or quit orca dialogs.  But you can use
> Ctrl-alt-tab to switch focus to another window, and then they work...is that
> right?
> 
That is correct.  Control-Alt-Tab focuses the desktop.  Alt-F1 focuses the top panel.  From either of those, the Orca dialogs can be reached. In this configuration, there are no windows open--logging in without automatically starting any applications.
Comment 13 Thomas Thurman 2008-03-27 13:16:00 UTC
Are bugs 490668 and 496491 dupes of one another?

(Renaming since this has nothing to do with sessions.)
Comment 14 Thomas Thurman 2008-03-27 13:16:31 UTC
Trying again:
Are bug 490668 and bug 496491 dupes of one another?
Comment 15 Thomas Thurman 2008-03-28 18:40:31 UTC
Elijah: Is bug 85793 the one that you thought this might be a dupe of?
Comment 16 Elijah Newren 2008-04-05 17:13:37 UTC
No, there's both a stacking order bug and a focus bug related to startup in the 8xxxx range (you pointed out the bug 85793 is the stacking order one).
Comment 17 Thomas Thurman 2008-04-08 12:23:00 UTC
Maybe it was bug 88194.  (Trying to organise my worklist...)
Comment 18 André Klapper 2020-11-06 20:06:07 UTC
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old bug reports in Bugzilla which have not seen updates for many years.

If you can still reproduce this issue in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/metacity/-/issues/

Thank you for reporting this issue and we are sorry it could not be fixed.