GNOME Bugzilla – Bug 592393
Clicking on a minimized window in the overview doesn't focus the window
Last modified: 2009-08-28 16:13:30 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.
Created attachment 141199 [details] [review] patch
Created attachment 141204 [details] [review] git format-patch The same as above, but using 'git format-patch'.
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.)
Just reproduced, confirming
Bug moved to mutter. meta_workspace_activate_with_focus() in mutter doesn't unminimze minimized windows as described.
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).
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.
Created attachment 141770 [details] [review] patch
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!