diff -uNr metacity/src/window.c metacity-115000/src/window.c
--- metacity/src/window.c	2003-06-12 16:05:42.000000000 +0200
+++ metacity-115000/src/window.c	2003-06-12 16:17:25.000000000 +0200
@@ -5503,13 +5503,11 @@
           
       window->shaken_loose = TRUE;
 
-      /* Unmaximize at wherever the window would have moved to if it
-       * hadn't been maximized. FIXME if you grab the right side of
-       * the titlebar then on unmaximize the pointer isn't on the
-       * titlebar which is kind of odd.
-       */
-      window->saved_rect.x = new_x;
-      window->saved_rect.y = new_y;
+      /* move the unmaximized window to the cursor */
+      window->display->grab_initial_window_pos.x = window->display->grab_initial_root_x - window->saved_rect.width / 2;
+      window->display->grab_initial_window_pos.y = window->display->grab_initial_root_y;
+      window->saved_rect.x = window->display->grab_initial_window_pos.x + dx;
+      window->saved_rect.y = window->display->grab_initial_window_pos.y + dy;
           
       meta_window_unmaximize (window);
 
