GNOME Bugzilla – Bug 107681
focus the appropriate window when minimizing the active window
Last modified: 2004-12-22 21:47:04 UTC
Package: gnome-panel Severity: enhancement Version: 2.2.0.1 Synopsis: focus the next topmost window when minimizing a window Bugzilla-Product: gnome-panel Bugzilla-Component: Window List Applet Description: right now, when minimizing a window from the window list (with a mouse click), after the window gets minimized the focus remain in the window list. window list applet should present an option to focus the next topmost window in the sequence after the selected window is minimized. this is the expected behavior when the user is working with the mouse and he/she can see (or knows) what is the window behind the current one. otherwise, it is very annoying to click one more time just to define an obvious focus. thanks for the attention, you are doing a great job additional Information: using gnome 2.2 from debian/unstable repository ------- Bug moved to this database by unknown@bugzilla.gnome.org 2003-03-05 19:36 ------- Reassigning to the default owner of the component, gnome-panel-maint@bugzilla.gnome.org.
Confirmed. Focus remains on window list, that doesn't make much sense. Havoc, what do you think?
Makes sense, but the particular focus choice suggested only works for click-to-focus mode. I don't think libwnck should be choosing the window to focus upon minimization. Metacity abondoned topmost window for MRU (most recently used) window a while ago (note that the two are identical for click-to-focus, but not for sloppy/mouse focus). See also bug 135810. Having libwnck try to pick the right window to minimize would be highly problematic. However, there doesn't appear to be a window manager hint in the EWMH spec for window minimization. I _think_ the correct way to handle this bug would be to suggest an extended WM hint (similar to _NET_WINDOW_ACTIVATE or _NET_CLOSE_WINDOW) on the wm-spec list, add it to Metacity, and then change libwnck's _wnck_iconify (in xutils.c) to make use of the hint (similar to how _wnck_close or _wnck_activate work). Does that sound reasonable, Havoc?
See also bug 128200; it's essentially the same bug, just filed against Metacity. Since I believe both Metacity and libwnck need to be changed, I haven't marked these as duplicates.
Created attachment 28744 [details] [review] libwnck portion of patch to enable focusing the correct window after minimization After coding up this patch (and the corresponding one that I'm about to post to bug 128200, which is also required), I realized that this might not be the best way to do this. It may be better to stick with the old XIconify and WM_CHANGE_STATE method, merely for backward compatibility. But it's time for bed so I'm posting what I have now.
See also http://mail.gnome.org/archives/wm-spec-list/2004-June/msg00002.html, since _NET_WM_STATE_MINIMIZED isn't yet part of the EWMH spec...
Comment on attachment 28744 [details] [review] libwnck portion of patch to enable focusing the correct window after minimization Ignore this patch. It was totally wrong (see bug 122640 for why; basically I shouldn't have used _NET_WM_STATE_MINIMIZED). However, there is a patch that fixes this bug attached to bug 120100.
The patch in bug 120100 was a hack that was understandably rejected. Back to square one. However, maybe _NET_WM_STATED_MINIMIZED will be the right way to do things after all; the wm-spec list seemed to agree that such an addition to the spec sounded okay, it's just that no one has decided to do it yet. Also, see bug 102665 for the analogous but reverse issue--i.e. when unminimizing a window from the tasklist it should usually be focused.
This has been fixed by the patch in bug 128200.