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 592393 - Clicking on a minimized window in the overview doesn't focus the window
Clicking on a minimized window in the overview doesn't focus the window
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2009-08-19 22:58 UTC by DELETED
Modified: 2009-08-28 16:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (521 bytes, patch)
2009-08-20 00:13 UTC, DELETED
none Details | Review
git format-patch (857 bytes, patch)
2009-08-20 01:09 UTC, DELETED
none Details | Review
patch? (1003 bytes, patch)
2009-08-24 01:48 UTC, DELETED
reviewed Details | Review
patch (2.25 KB, patch)
2009-08-26 17:54 UTC, DELETED
none Details | Review

Description DELETED 2009-08-19 22:58:26 UTC
If you are in the overview and click on a minimized window on a workspace which does NOT have the white frame, the window doesn't get the focus when the workspace is shown, thus it is not visible.

However, if you click on a minimized window on the workspace with the white frame, the window gets the focus and shows up on the workspace as expected.
Comment 1 DELETED 2009-08-20 00:13:25 UTC
Created attachment 141199 [details] [review]
patch
Comment 2 DELETED 2009-08-20 01:09:19 UTC
Created attachment 141204 [details] [review]
git format-patch

The same as above, but using 'git format-patch'.
Comment 3 DELETED 2009-08-20 02:26:56 UTC
I'm sorry, this is not a patch, but a workaround, if workspace.activate_with_focus(metaWindow, time) is supposed to focus metaWindow(?) Otherwise the problem would also be noticed with windows that are not minimized. (They wouldn't get the focus neither, but they do get it.)
Comment 4 lexual 2009-08-23 02:13:33 UTC
Just reproduced, confirming
Comment 5 DELETED 2009-08-23 23:02:27 UTC
Bug moved to mutter. meta_workspace_activate_with_focus() in mutter doesn't unminimze minimized windows as described.
Comment 6 DELETED 2009-08-24 01:48:01 UTC
Created attachment 141520 [details] [review]
patch?

Call meta_window_activate(focus_this, timestamp) instead of meta_window_focus(focus_this, timestamp) and meta_window_raise(focus_this).
Comment 7 Owen Taylor 2009-08-24 19:27:15 UTC
Patch looks good:

 * You have: From: 'ronjab <ronjab@live.com>'

   It's not a hard requirement, but almost everybody uses a real name
   there. [Or a fake real-looking name - we don't check :-)]

 * The commit message should give some more background about why the
   fix makes sense.

   Basically what we discussed in IRC: that for the existing usage inside
   Mutter the function is never called on a minimized window, and if someone
   is calling it outside of Mutter, then there is no point in focusing a 
   minimized window without unminimizing it first.

Can I convince you to take a stab at writing a doc comment for the function and including it in the patch? Looking through the code, the three non-obvious things that should be mentioned are:

 - if a window is currently being moved by the user, it will be moved to the new workspace

 - the focus_window window is activated by calling meta_window_activate() which will unminimize it and transient parents, raise it, and give it the keyboard focus.

 - that the advantage of calling this function rather than separately meta_workspace_activate() and meta_window_activate() is that it happens as a unit - we won't first focus some other window than focus the desired window.
Comment 8 DELETED 2009-08-26 17:54:52 UTC
Created attachment 141770 [details] [review]
patch
Comment 9 Owen Taylor 2009-08-28 16:13:30 UTC
Pushed with minor fixes:

 - add ", or %NULL" to @focus_window descriptionb
 - focussed => focused
 - beeing => being
 - Advantage => advantage
 - Removed the mention of meta_compositor_switch_workspace() since that's just one part of the implementation of switching workspaces.

Thanks!