GNOME Bugzilla – Bug 147947
Multiple minimizations no longer give focus to the window behind
Last modified: 2004-12-22 21:47:04 UTC
Open lots of windows and go hitting, for instance, Alt+F9. In Gnome 2.2, the window behind the one being minimized always got focus. Since 2.4, after the second or third hit the windows don't get focus and stay shaded. I really miss 2.2 in that regard, something has changed. I'd like this to be [re]added to metacity.
This is fixed in CVS. (I'm marking as a duplicate of 131582, but it is also closely related to bug 135810) *** This bug has been marked as a duplicate of 131582 ***
hmm, I just upgraded to metacity 2.8.5, and this behavior is still observed.. was CVS anything higher than this version?
What focus mode are you running in--click, sloppy, or mouse?
click
Yeah, I can duplicate. It appears that the correct window still has focus because continuing to hit Alt+F9 will minimize the correct windows and in the correct order. I'll look into it...
This is also reproducible under sloppy focus, but only when no window is under the mouse (or, only once you've already minimized all the windows under the mouse). It's not reproduceable in mouse focus. The problem turns out to be that when we minimize a window, we don't rearrange it's location in the mru list. I think we may have done that intentionally, but just as with alt-tabbing, we also need to do some filtering in focus_mru_window for minimized windows. I'll attach a one-line patch that fixes the problem in a moment.
Created attachment 31653 [details] [review] Filter minimized windows out in focus_mru_window()
> It appears that the correct window still has focus > because continuing to hit Alt+F9 will minimize the correct windows and in the > correct order. Yes, I'm aware of this, but beware, it doesn't always work, Alt+F9 for a shaded window.. my experience is that sometimes it does, but others it doesn't. > I'll look into it... Thanks a lot, this is been in my mind for quite some time, I was waiting unpatiently for the fix.. I'll try to build with your patch in Debian and see how it goes, if I suceed - new metacity seemed to need the new version of gtk which isn't even in experimental yet to compile. I hope a fix for this is committed. =) Cheers
I wrote: > Yes, I'm aware of this, but beware, it doesn't always work, Alt+F9 for a shaded > window.. my experience is that sometimes it does, but others it doesn't. I just realized, it seems the differential factor here is whether the mouse is or not inside the shaded window area. If it is, Alt+F9 will minimize it. If it isn't, it won't.
Doesn't really matter--there's a bug, and what we do when we get struck by the bug isn't as important as fixing the actual bug. And my patch fixes it as far as I can tell. Could you test and confirm? (If you have difficulty doing that with 2.8.5, I can easily backport--just tell me the version you want the patch against)
Seems like a sensible patch to me, thanks. I'd commit to 2.8 branch
committed.
I managed to build a patched 2.8.5, seems to be fixed perfectly. Good work. I'll feedback if I notice anything. Thank you.