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 147947 - Multiple minimizations no longer give focus to the window behind
Multiple minimizations no longer give focus to the window behind
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.8.x
Other Linux
: High minor
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2004-07-20 02:58 UTC by José Toneh
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: 2.8.x
GNOME version: 2.7/2.8


Attachments
Filter minimized windows out in focus_mru_window() (648 bytes, patch)
2004-09-17 18:11 UTC, Elijah Newren
none Details | Review

Description José Toneh 2004-07-20 02:58:20 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.
Comment 1 Elijah Newren 2004-07-20 23:52:48 UTC
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 ***
Comment 2 José Toneh 2004-09-17 16:48:56 UTC
hmm, I just upgraded to metacity 2.8.5, and this behavior is still observed..
was CVS anything higher than this version?
Comment 3 Elijah Newren 2004-09-17 17:01:19 UTC
What focus mode are you running in--click, sloppy, or mouse?
Comment 4 José Toneh 2004-09-17 17:09:49 UTC
click
Comment 5 Elijah Newren 2004-09-17 17:45:27 UTC
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...
Comment 6 Elijah Newren 2004-09-17 18:10:26 UTC
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.
Comment 7 Elijah Newren 2004-09-17 18:11:09 UTC
Created attachment 31653 [details] [review]
Filter minimized windows out in focus_mru_window()
Comment 8 José Toneh 2004-09-17 18:38:16 UTC
> 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
Comment 9 José Toneh 2004-09-17 18:45:11 UTC
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.
Comment 10 Elijah Newren 2004-09-17 19:19:42 UTC
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)
Comment 11 Havoc Pennington 2004-09-17 19:37:45 UTC
Seems like a sensible patch to me, thanks. I'd commit to 2.8 branch
Comment 12 Elijah Newren 2004-09-17 19:49:52 UTC
committed.
Comment 13 José Toneh 2004-09-17 23:21:27 UTC
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.