Index: src/window.c
===================================================================
RCS file: /cvs/gnome/metacity/src/window.c,v
retrieving revision 1.358
diff -p -u -r1.358 window.c
--- src/window.c	24 Dec 2004 19:40:09 -0000	1.358
+++ src/window.c	28 Dec 2004 02:05:24 -0000
@@ -438,6 +438,8 @@ meta_window_new_with_attrs (MetaDisplay 
   window->minimized = FALSE;
   window->iconic = FALSE;
   window->mapped = attrs->map_state != IsUnmapped;
+  /* if already mapped, no need to worry about focus-on-first-time-showing */
+  window->showing_for_first_time = !window->mapped;
   /* if already mapped we don't want to do the placement thing */
   window->placed = window->mapped;
   if (window->placed)
@@ -1761,8 +1763,13 @@ meta_window_show (MetaWindow *window)
         }
     }
 
-  if (did_placement)
+  /* We don't want to worry about all cases from inside
+   * implement_showing(); we only want to worry about focus if this
+   * window has not been shown before.
+   */
+  if (window->showing_for_first_time)
     {
+      window->showing_for_first_time = FALSE;
       if (takes_focus_on_map)
         {                
           meta_window_focus (window,
Index: src/window.h
===================================================================
RCS file: /cvs/gnome/metacity/src/window.h,v
retrieving revision 1.111
diff -p -u -r1.111 window.h
--- src/window.h	24 Dec 2004 15:43:46 -0000	1.111
+++ src/window.h	28 Dec 2004 02:05:24 -0000
@@ -207,6 +207,9 @@ struct _MetaWindow
   /* Have we placed this window? */
   guint placed : 1;
 
+  /* Has this window not ever been shown yet? */
+  guint showing_for_first_time : 1;
+
   /* Are we in meta_window_free()? */
   guint unmanaging : 1;
 
