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 108643 - should focus in MRU order instead of stack order
should focus in MRU order instead of stack order
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.4.x
Other Linux
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
: 118369 (view as bug list)
Depends on: 97635
Blocks:
 
 
Reported: 2003-03-18 00:52 UTC by Iain
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.3/2.4


Attachments
Use MRU list for focusing after window is deleted. (841 bytes, patch)
2003-08-17 10:57 UTC, Ray Strode
none Details | Review

Description Iain 2003-03-18 00:52:32 UTC
Metacity focuses windows based in order of "depth", where a newer window is
higher than a window that is already opened. So if I have Terminal A
opened, and then I open Terminal B, and then from terminal A I run , say
gnome-calculator, when I close gnome-calculator, focus goes to terminal B.

I think it should go to terminal A, as it was the last focused window. How
this would be done in the code, I'm not sure, but I think it would feel
better, because at least I know what window the cursor is returning to.

I've probably not articulated myself very well, and for this I apologise
Comment 1 Rob Adams 2003-03-18 00:57:09 UTC
MRU order?  Pretty easy to do; seems like a pretty good idea to me. 
Will this break anything?
Comment 2 Havoc Pennington 2003-03-18 01:36:41 UTC
Only matters in sloppy focus, as in click to focus at least 
theoretically the stacking order is the same as mru order.
Right?

In sloppy focus, I would expect that when you close a window, 
it focuses the window under the mouse. But maybe we don't do that, I
forget all the exceptions we make to strict mouse focus.
If we currently focus the topmost window, MRU makes more sense probably.

In both cases, if you close a dialog, its parent should be focused 
(should have priority over the MRU or stacking algorithm), most
likely. Imagine you have a dialog open in app A, then use app B for a
minute, then close the dialog, you should remain in app A not return
to app B. I guess this is another way of saying that the MRU should 
be an MRU of apps then an MRU of windows within each app, 
though it isn't necessarily implemented that way.
Comment 3 Rob Adams 2003-07-26 22:15:38 UTC
*** Bug 118369 has been marked as a duplicate of this bug. ***
Comment 4 Havoc Pennington 2003-08-13 19:36:54 UTC
patch on bug 97635 should fix this
Comment 5 Rob Adams 2003-08-16 16:00:05 UTC
Bug 97635 patch has been committed.  Closing bug.
Comment 6 Ray Strode 2003-08-17 10:54:43 UTC
Note that the patch in bug 97635 didn't quite fix this problem.  I
will attach a small patch that seems to work.
Comment 7 Ray Strode 2003-08-17 10:57:22 UTC
Created attachment 19283 [details] [review]
Use MRU list for focusing after window is deleted.
Comment 8 Havoc Pennington 2003-08-17 14:40:00 UTC
That looks good to commit.
Comment 9 Ray Strode 2003-08-17 21:44:25 UTC
Okay, commited:

2003-08-17  Ray Strode  <halfline@hawaii.rr.com>
                                                                     
          
        * src/delete.c (meta_window_delete): Use MRU list to find focusing
        window after a window is deleted instead of using top window. Fix
        for #108643.
Comment 10 Rob Adams 2003-09-05 03:53:18 UTC
this bug can now be closed, since this is implemented in the latest
metacity release.