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 102665 - Unminimizing from window list right-click menu doesn't focus unminimized window
Unminimizing from window list right-click menu doesn't focus unminimized window
Status: RESOLVED FIXED
Product: libwnck
Classification: Core
Component: general
unspecified
Other All
: Normal minor
: ---
Assigned To: libwnck maintainers
libwnck maintainers
AP3
Depends on:
Blocks:
 
 
Reported: 2003-01-06 16:23 UTC by Calum Benson
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch fixes the bug. (1.33 KB, patch)
2003-08-19 12:02 UTC, Vijaykumar Patwari
none Details | Review

Description Calum Benson 2003-01-06 16:23:22 UTC
From a recent review by a Sun beta tester:

"When a minimize window is restored by selecting Unminimize in the window
menu (using either the pointing device or keyboard), focus is not assigned
to the restored window.  However, when a minimized window is restored by
clicking the tasklist button, focus is assigned to the restored window. 
The window should receive focus regardless of the method used to perform
the action."
Comment 1 padraig.obriain 2003-03-26 15:03:57 UTC
I am tranferring this bug to libwnck as I believe that is the correct
product category.

It seems that the request is that wnck_window_minimize() should also
call wnck_window_activate() to activate the window.
Comment 2 Calum Benson 2003-04-03 14:35:40 UTC
Updating status_whiteboard field to reflect A11Y team's assessment 
of accessibility impact.
Comment 3 Calum Benson 2003-08-07 16:18:37 UTC
Apologies for spam... marking as GNOMEVER2.3 so it appears on the official GNOME
bug list :)
Comment 4 Vijaykumar Patwari 2003-08-19 12:02:56 UTC
Created attachment 19342 [details] [review]
Patch fixes the bug.
Comment 5 Vincent Untz 2003-10-16 14:16:43 UTC
Did someone review this patch ?
Comment 6 Kjartan Maraas 2004-04-18 21:22:28 UTC
Havoc, is this ok to apply for 2.6.1?
Comment 7 Elijah Newren 2004-06-22 21:20:45 UTC
Personally, I'm curious as to whether having Metacity itself do the focusing
when unminimizing a window would be better than having libwnck instruct Metacity
to do it.  In particular, I believe this depends on focus mode.  For
click-to-focus we want the unminimized window to be focused.  For mouse focus,
we only want it focused if the window happens to be under the mouse after being
unminimized (unless we want to break that invariant here, but I dislike breaking
invariants where not necessary?).  For sloppy focus, who knows?  ...focus it
unless a different window is under the mouse?  (See also bug 135810, which
discusses issues of which window to focus for the various focus modes in more
detail)

Anyway, unless the policy is _always_ focus a window being unminimized (which
I'm not so sure it should be), the patch belongs in Metacity.  Metacity may be
the better place anyway, because that leaves room for future flexibility if we
change our minds about the best operation.

I'm going to cc metacity-maint because of this...
Comment 8 Havoc Pennington 2004-06-23 00:20:31 UTC
That seems sensible, but may have unexpected side effects if you implemented it
and tried it out. Only way to know would be to try it.
Comment 9 Elijah Newren 2004-06-24 22:24:29 UTC
Actually, this bug (and a very closely related one introduced by the
_NET_WM_USER_TIME commit) is further proof that _NET_WM_STATE_MINIMIZED would be
really nice for the spec to have.  Let me explain:

libwnck uses either gdk_window_show or XMapRaised to unminimize a window.  This
window needs to be focused in the case of click-to-focus or sloppy-focus, but
not for mouse-focus.  libwnck doesn't know that, so Metacity has to do it.  This
means having Metacity somehow intercept a window being remapped, and then
focusing the appropriate window (although that raises the question, "How does
Metacity know whether the remapped window should be focused?  Should it be in
all cases, or only in the case where libwnck caused it to happen?")

Also, since libwnck is remapping a window that probably is not the most recently
interacted with, it appears below the focused window.  libwnck could manually
set the _NET_WM_USER_TIME hint before deiconifying the window, but wouldn't this
be a better job for the window manager to handle?  As the complexity increases,
it just seems that it would be nicer to have the tasklist be able to send a
message to the WM saying "unminimize this window, and do all the other stuff you
need to do", instead of having the tasklist try to do all that work itself, and
somehow keep in sync with the WM policy.
Comment 10 Elijah Newren 2004-08-02 20:23:00 UTC
I'm going to second guess myself and say that Vijaykumar's patch could be viewed
as correct, with the following logic:

  The choice of window to focus after close/minimize/switch-desktop does
  depend on focus method, as I pointed out (see bug 135810).  However,
  unminimize can be viewed as the same as launching a new window, which
  ignores the methods in bug 135810 and merely compares timestamps (see
  bug 118372) to determine whether to focus the window.

That actually does sound pretty appealing, since uniminimize does act a lot more
like a new window launching than it does like close/minimize/switch-desktop. 
Thoughts?
Comment 11 Elijah Newren 2004-08-02 20:36:48 UTC
Er, let me modify that statement slightly to "Vijaykumar's patch could be viewed
as providing correct behavior".  I really think that what I wrote above, as well
as what Rob wrote in comment 95 of bug 118372, is valid about it being
Metacity's responsibility to do the work.  But Vijaykumar's patch could possibly
be used as a temporary hack to make things work right.
Comment 12 Elijah Newren 2004-08-09 14:59:13 UTC
This has been fixed by the patches in bug 118372 (skip the first 100 comments or
so and then start reading; only the last 10 or so comments were about the
patches related to this bug).