GNOME Bugzilla – Bug 108643
should focus in MRU order instead of stack order
Last modified: 2004-12-22 21:47:04 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
MRU order? Pretty easy to do; seems like a pretty good idea to me. Will this break anything?
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.
*** Bug 118369 has been marked as a duplicate of this bug. ***
patch on bug 97635 should fix this
Bug 97635 patch has been committed. Closing bug.
Note that the patch in bug 97635 didn't quite fix this problem. I will attach a small patch that seems to work.
Created attachment 19283 [details] [review] Use MRU list for focusing after window is deleted.
That looks good to commit.
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.
this bug can now be closed, since this is implemented in the latest metacity release.