From 6cda7d0b11942166a3cbbf50803bff616cb38afd Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Tue, 18 Jun 2002 01:41:08 +0000 Subject: [PATCH] fix from Gaute Lindkvist #82977 for unsticking windows 2002-06-17 Havoc Pennington * src/window.c (meta_window_change_workspace): fix from Gaute Lindkvist #82977 for unsticking windows --- ChangeLog | 5 +++++ rationales.txt | 2 ++ src/window.c | 15 ++++----------- 3 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 rationales.txt diff --git a/ChangeLog b/ChangeLog index 92891c6a3..2cb97a95c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-06-17 Havoc Pennington + + * src/window.c (meta_window_change_workspace): fix from Gaute + Lindkvist #82977 for unsticking windows + 2002-06-17 Frederic Crozat * src/metacity.schemas.in: associate close_window keybinding to diff --git a/rationales.txt b/rationales.txt new file mode 100644 index 000000000..9deec45b1 --- /dev/null +++ b/rationales.txt @@ -0,0 +1,2 @@ + +Focus windows on map: see http://bugzilla.gnome.org/show_bug.cgi?id=82921 diff --git a/src/window.c b/src/window.c index 80f9b6b37..416f52f80 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);