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 116248 - WM keynav breaks on window close
WM keynav breaks on window close
Status: RESOLVED DUPLICATE of bug 84564
Product: metacity
Classification: Other
Component: general
2.5.x
Other All
: Normal major
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
AP1
Depends on:
Blocks:
 
 
Reported: 2003-06-29 10:36 UTC by bill.haneman
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch to gok (596 bytes, patch)
2003-07-22 11:09 UTC, padraig.obriain
none Details | Review
New patch for gok (1.07 KB, patch)
2003-07-22 16:35 UTC, padraig.obriain
none Details | Review

Description bill.haneman 2003-06-29 10:37:00 UTC
Under some circumstances when a window is closed (for instance, if it's a
child dialog of a window which rejects focus), metacity can get into a
state where no window's border has the "focussed" decoration visuals, and
Alt-TAB doesn't cycle focus.  Clicking on a focussable window titlebar
corrects the problem.  Note that when in this state, Ctrl-Alt-TAB doesn't
do anything either (!).

To reproduce:

start GOK without StickyKeys enabled.  A dialog will appear saying "Gok has
enabled sticky keys....".

Press spacebar to activate the "OK" button on the dialog.  Dialog closed,
focus is in indeterminate state.  Now Alt-TAB does nothing.
Comment 1 bill.haneman 2003-06-29 10:37:36 UTC
Definitely an accessibility stopper.
Comment 2 Havoc Pennington 2003-06-29 16:58:55 UTC
This is a hugely old bug we've never figured out. There's already 
an open bug for it I'm pretty sure.
Comment 3 padraig.obriain 2003-07-21 13:20:43 UTC
This seems to be related to but not the same as bug 84564.

If WM_SET_FOCUS ois used to specify what window should request focus
but the client declines tje opffer of focus how does metacity know
that this has happended.

Should metacity create a timeout handler and if some window has not
requested focus when the timeout has expired then the focus be given
to some other window?
Comment 4 padraig.obriain 2003-07-22 11:09:00 UTC
Created attachment 18516 [details] [review]
Proposed patch to gok
Comment 5 padraig.obriain 2003-07-22 11:10:46 UTC
There seem to be two separate complaints here:

1) No window has focus
2) Alt+Tab and Ctrl+Alt+Tab has no effect.

The proposed patch to gok seems to fix the second problem.
Comment 6 David Bolter 2003-07-22 14:05:37 UTC
Padraig, your patch looks harmless to my untrained eye. I gave it a
try,  I do not lie, please apply.  I'd like to leave it open for a bit
though, so that we can test at length before forgetting this delta.  I
am getting some wonkiness today that I suspect is related to my gnome
keyboard accessibility settings, though I am unsure...  I don't think
it is related to your patch.
Comment 7 padraig.obriain 2003-07-22 14:17:01 UTC
I have applied the patch to gok CVS HEAD.
Comment 8 David Bolter 2003-07-22 15:23:48 UTC
Padraig could you try this:

1  start gok (such that the sticky keys info dialog comes up)
2  move the mouse into the dialog,
3  move it back to the gok window,
  repeat 2,3...

The behaviour is such that focus tracks the mouse even though that
preference is not set.
Comment 9 padraig.obriain 2003-07-22 16:35:08 UTC
Created attachment 18525 [details] [review]
New patch for gok
Comment 10 padraig.obriain 2003-07-22 16:35:36 UTC
David,

Does the new patch improve things?
Comment 11 David Bolter 2003-07-22 20:01:30 UTC
Padraig, the patch does improve things for me.  Thanks.  This callback
is called fairly often, I suppose it is okay traverse the top
levels... shouldn't eat too much resources I guess.  Please apply this
patch if you feel comfortable with it.
Comment 12 padraig.obriain 2003-07-23 09:22:19 UTC
I have applied this patch.

It has the strange effect that when dialog box is closed keyboardfocus
returns to the terminal window from which gok was launched but
metacity does not show that window as having focus.
Comment 13 David Bolter 2003-07-23 13:08:23 UTC
Padraig, does you patch to bug 118105 fix this latter behaviour?
Comment 14 padraig.obriain 2003-07-23 13:17:14 UTC
No. Bug 118105 is not related to the problem I described above.

It seems that after gok calls XSetInputFocus() setting focus to
PointerRoot keyboard focus reverts to previous terminal window but
metacity is not aware of it.
Comment 15 padraig.obriain 2003-08-06 08:45:14 UTC
Because of bug 118865 the proposed gok patch will need to be reverted.

The problem in metacity seems to be what happens if WM_TAKE_FOCUS
client message is sent to a window and this does not result in
XSetInputFocus being called.
Comment 16 Calum Benson 2003-08-07 16:07:15 UTC
Apologies for spam... marking as GNOMEVER2.3 so it appears on the official GNOME
bug list :)
Comment 17 padraig.obriain 2003-08-20 11:23:04 UTC

*** This bug has been marked as a duplicate of 84564 ***