mirror of
https://github.com/brl/mutter.git
synced 2025-02-04 07:34:09 +00:00
Unminimize windows passed to meta_workspace_activate_with_focus()
Unminimize minimized windows passed to meta_workspace_activate_with_focus() by calling meta_window_activate() on them instead of meta_window_focus() and meta_window_raise(). This fix makes sense because for the existing usage inside Mutter meta_workspace_activate_with_focus() is never called on a minimized window and for calls from outside Mutter there is no point in focusing a minimized window without unminimizing it first. Add a doc comment to meta_workspace_activate_with_focus(). http://bugzilla.gnome.org/show_bug.cgi?id=592393
This commit is contained in:
parent
3e09b4a725
commit
a69ce37546
@ -439,6 +439,25 @@ meta_workspace_queue_calc_showing (MetaWorkspace *workspace)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* meta_workspace_activate_with_focus:
|
||||||
|
* @workspace: a #MetaWorkspace
|
||||||
|
* @focus_this: the #MetaWindow to be focused, or %NULL
|
||||||
|
* @timestamp: timestamp for @focus_this
|
||||||
|
*
|
||||||
|
* Switches to @workspace and possibly activates the window @focus_this.
|
||||||
|
*
|
||||||
|
* The window @focus_this is activated by calling meta_window_activate()
|
||||||
|
* which will unminimize it and transient parents, raise it and give it
|
||||||
|
* the focus.
|
||||||
|
*
|
||||||
|
* If a window is currently being moved by the user, it will be
|
||||||
|
* moved to @workspace.
|
||||||
|
*
|
||||||
|
* The advantage of calling this function instead of meta_workspace_activate()
|
||||||
|
* followed by meta_window_activate() is that it happens as a unit, so
|
||||||
|
* no other window gets focused first before @focus_this.
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
meta_workspace_activate_with_focus (MetaWorkspace *workspace,
|
meta_workspace_activate_with_focus (MetaWorkspace *workspace,
|
||||||
MetaWindow *focus_this,
|
MetaWindow *focus_this,
|
||||||
@ -562,8 +581,7 @@ meta_workspace_activate_with_focus (MetaWorkspace *workspace,
|
|||||||
*/
|
*/
|
||||||
if (focus_this)
|
if (focus_this)
|
||||||
{
|
{
|
||||||
meta_window_focus (focus_this, timestamp);
|
meta_window_activate (focus_this, timestamp);
|
||||||
meta_window_raise (focus_this);
|
|
||||||
}
|
}
|
||||||
else if (move_window)
|
else if (move_window)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user