--- src/core.c-ORIGINAL	2004-09-06 17:23:50.000000000 -0700
+++ src/core.c	2004-09-07 18:31:14.000000000 -0700
@@ -236,8 +236,8 @@ meta_core_user_raise (Display *xdisplay,
 }
 
 void
-meta_core_user_lower (Display *xdisplay,
-                      Window   frame_xwindow)
+meta_core_user_lower_and_unfocus (Display *xdisplay,
+                                  Window   frame_xwindow)
 {
   MetaDisplay *display;
   MetaWindow *window;
@@ -249,6 +249,36 @@ meta_core_user_lower (Display *xdisplay,
     meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
   
   meta_window_lower (window);
+
+  if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
+    {
+      /* Move window to the back of the focusing workspace's MRU list.
+       * Do extra sanity checks to avoid possible race conditions.
+       * (Borrowed from window.c.)
+       */
+      if (window->screen->active_workspace &&
+          meta_window_visible_on_workspace (window, 
+                                            window->screen->active_workspace))
+        {
+          GList* link;
+          link = g_list_find (window->screen->active_workspace->mru_list, 
+                              window);
+          g_assert (link);
+
+          window->screen->active_workspace->mru_list = 
+            g_list_remove_link (window->screen->active_workspace->mru_list,
+                                link);
+          g_list_free (link);
+
+          window->screen->active_workspace->mru_list = 
+            g_list_append (window->screen->active_workspace->mru_list, 
+                           window);
+        }
+
+      /* focus on the (new) topmost window */
+      if (window->has_focus)
+        meta_workspace_focus_default_window (window->screen->active_workspace, window);
+    }
 }
 
 void
--- src/core.h-ORIGINAL	2004-09-06 18:50:40.000000000 -0700
+++ src/core.h	2004-09-07 18:31:41.000000000 -0700
@@ -60,8 +60,8 @@ void meta_core_user_resize  (Display *xd
 
 void meta_core_user_raise   (Display *xdisplay,
                              Window   frame_xwindow);
-void meta_core_user_lower   (Display *xdisplay,
-                             Window   frame_xwindow);
+void meta_core_user_lower_and_unfocus (Display *xdisplay,
+                                       Window   frame_xwindow);
 
 void meta_core_user_focus   (Display *xdisplay,
                              Window   frame_xwindow,
--- src/frames.c-ORIGINAL	2004-09-06 18:53:55.000000000 -0700
+++ src/frames.c	2004-09-06 18:54:13.000000000 -0700
@@ -1373,7 +1373,7 @@ meta_frames_button_press_event (GtkWidge
     }
   else if (event->button == 2)
     {
-      meta_core_user_lower (gdk_display, frame->xwindow);
+      meta_core_user_lower_and_unfocus (gdk_display, frame->xwindow);
     }
   else if (event->button == 3)
     {
