diff options
author | Elijah Newren <newren@gmail.com> | 2005-02-20 22:44:15 +0000 |
---|---|---|
committer | Elijah Newren <newren@src.gnome.org> | 2005-02-20 22:44:15 +0000 |
commit | 8de466b582b6e7150e01b1013f37bbc31e637e96 (patch) | |
tree | ec6214d5d37602857798d5ad23f2f1d0e4536a95 | |
parent | 79f2b916794c4a6ade9b0a11489da9d0d00ca20b (diff) | |
download | metacity-8de466b582b6e7150e01b1013f37bbc31e637e96.tar.gz |
when receiving a _NET_ACTIVE_WINDOW message, switch to the desktop where
2005-02-20 Elijah Newren <newren@gmail.com>
* src/window.c: (meta_window_activate): when receiving a
_NET_ACTIVE_WINDOW message, switch to the desktop where the window
is located before activating instead of moving the window to the
current desktop. Thanks to Lubos Lunak for catching this issue.
Fixes #128380.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | src/window.c | 33 |
2 files changed, 29 insertions, 12 deletions
@@ -1,5 +1,13 @@ 2005-02-20 Elijah Newren <newren@gmail.com> + * src/window.c: (meta_window_activate): when receiving a + _NET_ACTIVE_WINDOW message, switch to the desktop where the window + is located before activating instead of moving the window to the + current desktop. Thanks to Lubos Lunak for catching this issue. + Fixes #128380. + +2005-02-20 Elijah Newren <newren@gmail.com> + * src/window.c (meta_window_show): Ignore all focus and focus-stealing-prevention code in meta_window_show when not showing the window for the first time. Fixes #167199. diff --git a/src/window.c b/src/window.c index e4bb6cd0..45076a98 100644 --- a/src/window.c +++ b/src/window.c @@ -2234,22 +2234,31 @@ meta_window_activate (MetaWindow *window, /* disable show desktop mode unless we're a desktop component */ maybe_leave_show_desktop_mode (window); - /* Get window on current workspace */ - if (!meta_window_located_on_workspace (window, - window->screen->active_workspace)) - meta_window_change_workspace (window, - window->screen->active_workspace); - if (window->shaded) meta_window_unshade (window); unminimize_window_and_all_transient_parents (window); - - meta_window_raise (window); - meta_topic (META_DEBUG_FOCUS, - "Focusing window %s due to activation\n", - window->desc); - meta_window_focus (window, timestamp); + + /* Activate the window, moving to its workspace if necessary */ + if (!meta_window_located_on_workspace (window, + window->screen->active_workspace)) + { + meta_topic (META_DEBUG_FOCUS, + "Focusing and moving to workspace of window %s due to " + "activation\n", + window->desc); + meta_workspace_activate_with_focus (window->workspace, + window, + timestamp); + } + else + { + meta_window_raise (window); + meta_topic (META_DEBUG_FOCUS, + "Focusing window %s due to activation\n", + window->desc); + meta_window_focus (window, timestamp); + } } /* returns values suitable for meta_window_move |