Index: src/window.c
===================================================================
RCS file: /cvs/gnome/metacity/src/window.c,v
retrieving revision 1.341
diff -p -u -r1.341 window.c
--- src/window.c	19 Aug 2004 02:05:24 -0000	1.341
+++ src/window.c	26 Aug 2004 04:46:03 -0000
@@ -7298,9 +7298,9 @@ meta_window_stack_just_below (MetaWindow
       meta_topic (META_DEBUG_STACK,
                   "Setting stack position of window %s to %d (making it below window %s).\n",
                   window->desc, 
-                  below_this_one->stack_position - 1, 
+                  below_this_one->stack_position, 
                   below_this_one->desc);
-      meta_window_set_stack_position (window, below_this_one->stack_position - 1);
+      meta_window_set_stack_position (window, below_this_one->stack_position);
     }
   else
     {
Index: src/workspace.c
===================================================================
RCS file: /cvs/gnome/metacity/src/workspace.c,v
retrieving revision 1.59
diff -p -u -r1.59 workspace.c
--- src/workspace.c	6 Aug 2004 18:13:55 -0000	1.59
+++ src/workspace.c	26 Aug 2004 04:46:04 -0000
@@ -35,14 +35,36 @@ MetaWorkspace*
 meta_workspace_new (MetaScreen *screen)
 {
   MetaWorkspace *workspace;
+  GList         *workspaces;
 
   workspace = g_new (MetaWorkspace, 1);
 
+  workspace->mru_list = NULL;
+  workspaces = screen->workspaces;
+  while (workspaces != NULL)
+    {
+      MetaWorkspace *iter_workspace;
+      GList* windows;
+
+      iter_workspace = workspaces->data;
+      workspaces = workspaces->next;
+
+      windows = iter_workspace->windows;
+      while (windows != NULL)
+        {
+          MetaWindow *window = windows->data;
+          windows = windows->next;
+
+          if (window->on_all_workspaces && 
+              g_list_find (workspace->mru_list, window) == NULL)
+            workspace->mru_list = g_list_prepend (workspace->mru_list, window);
+        }
+    }
+
   workspace->screen = screen;
   workspace->screen->workspaces =
     g_list_append (workspace->screen->workspaces, workspace);
   workspace->windows = NULL;
-  workspace->mru_list = NULL;
 
   workspace->work_areas = NULL;
   workspace->work_areas_invalid = TRUE;
