summaryrefslogtreecommitdiff
path: root/src/window.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2002-06-18 01:41:08 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-06-18 01:41:08 +0000
commit6cda7d0b11942166a3cbbf50803bff616cb38afd (patch)
tree0d9c8730d009d2135f1472e4d21d4497dadd6d16 /src/window.c
parentc7a72aeed3484ab4977fdcb4245b2020469e3652 (diff)
downloadmetacity-6cda7d0b11942166a3cbbf50803bff616cb38afd.tar.gz
metacity-6cda7d0b11942166a3cbbf50803bff616cb38afd.tar.bz2
fix from Gaute Lindkvist #82977 for unsticking windows
2002-06-17 Havoc Pennington <hp@pobox.com> * src/window.c (meta_window_change_workspace): fix from Gaute Lindkvist #82977 for unsticking windows
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/window.c b/src/window.c
index 80f9b6b..416f52f 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2737,21 +2737,14 @@ meta_window_change_workspace (MetaWindow *window,
meta_verbose ("Changing window %s to workspace %d\n",
window->desc, meta_workspace_index (workspace));
- /* See if we're already on this space */
- if (g_list_find (window->workspaces, workspace) != NULL)
+ /* See if we're already on this space. If not, make sure we are */
+ if (g_list_find (window->workspaces, workspace) == NULL)
{
- meta_verbose ("%s already on this workspace\n", window->desc);
- return;
+ meta_workspace_add_window (workspace, window);
}
-
- /* Add first, to maintain invariant that we're always
- * on some workspace.
- */
- meta_workspace_add_window (workspace, window);
-
/* unstick if stuck */
if (window->on_all_workspaces)
- window->on_all_workspaces = FALSE;
+ meta_window_unstick (window);
/* Lamely rely on prepend */
g_assert (window->workspaces->data == workspace);