commit af1cedf69b85007e6414e96226315df7419f74cc
Author: Ted Percival <ted@midg3t.net>
Date:   Sun Jun 22 01:41:14 2008 +1000

    Ensure the user_rect is set sanely for windows that start maximized
    
    Prevents maximized windows from warping across the screen
    
    Fixes bug #504692

diff --git a/src/core/window.c b/src/core/window.c
index 6d9d314..eafe9b6 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -3547,9 +3547,12 @@ meta_window_move_resize_internal (MetaWindow          *window,
 
   /* user_rect is the position to restore towards if strut changes occur.  Thus
    * we want user_rect to reflect user position/size changes OR the initial
-   * placement of the window.
+   * placement of the window. On initial placement, we set the coords directly,
+   * bypassing the maximization checks.
    */
-  if (is_user_action || !window->placed)
+  if (!window->placed && !window->fullscreen)
+    meta_window_get_client_root_coords (window, &window->user_rect);
+  else if (is_user_action)
     meta_window_save_user_rect(window);
   
   if (need_move_frame || need_resize_frame ||
