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 107681 - focus the appropriate window when minimizing the active window
focus the appropriate window when minimizing the active window
Status: RESOLVED FIXED
Product: libwnck
Classification: Core
Component: general
unspecified
Other other
: Normal normal
: ---
Assigned To: libwnck maintainers
libwnck maintainers
Depends on:
Blocks: 128200
 
 
Reported: 2003-03-06 00:35 UTC by Rafael Jannone
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libwnck portion of patch to enable focusing the correct window after minimization (3.64 KB, patch)
2004-06-16 04:51 UTC, Elijah Newren
none Details | Review

Description Rafael Jannone 2003-03-06 00:36:50 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.

Comment 1 Fernando Herrera 2004-02-12 08:48:55 UTC
Confirmed. Focus remains on window list, that doesn't make much sense.
Havoc, what do you think?
Comment 2 Elijah Newren 2004-03-08 16:44:03 UTC
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?
Comment 3 Elijah Newren 2004-04-07 17:52:18 UTC
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.
Comment 4 Elijah Newren 2004-06-16 04:51:42 UTC
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.
Comment 5 Elijah Newren 2004-06-16 04:58:40 UTC
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 6 Elijah Newren 2004-06-24 00:02:50 UTC
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.
Comment 7 Elijah Newren 2004-08-02 19:51:54 UTC
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.
Comment 8 Elijah Newren 2004-09-15 17:10:08 UTC
This has been fixed by the patch in bug 128200.