[mutter] Unminimize windows passed to meta_workspace_activate_with_focus()
- From: Owen Taylor <otaylor src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [mutter] Unminimize windows passed to meta_workspace_activate_with_focus()
- Date: Fri, 28 Aug 2009 16:12:26 +0000 (UTC)
commit a69ce37546a42a1e5b84657d14ecbf184f907432
Author: Volker Sobek <reklov live com>
Date: Wed Aug 26 18:32:06 2009 +0200
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
src/core/workspace.c | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/src/core/workspace.c b/src/core/workspace.c
index 4e28601..b875147 100644
--- a/src/core/workspace.c
+++ b/src/core/workspace.c
@@ -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
meta_workspace_activate_with_focus (MetaWorkspace *workspace,
MetaWindow *focus_this,
@@ -562,8 +581,7 @@ meta_workspace_activate_with_focus (MetaWorkspace *workspace,
*/
if (focus_this)
{
- meta_window_focus (focus_this, timestamp);
- meta_window_raise (focus_this);
+ meta_window_activate (focus_this, timestamp);
}
else if (move_window)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]