diff -u -p -r metacity-2.4.3/src/window.c metacity-2.4.3-multihead/src/window.c
--- metacity-2.4.3/src/window.c	2002-10-29 07:21:22.000000000 +0100
+++ metacity-2.4.3-multihead/src/window.c	2002-11-16 10:34:31.000000000 +0100
@@ -6052,7 +6052,68 @@ update_move (MetaWindow  *window,
 {
   int dx, dy;
   int new_x, new_y;
+  int new_w, new_h;
+  int i;
+  MetaRectangle space_area;
+  GList *tmp;
+  int left_strut, right_strut, top_strut, bottom_strut;  
+
+  if (window->maximized)
+  {
+    /* snap to heads */
+    for (i = 0; i < window->screen->n_xinerama_infos; i++)
+    {
+      if (x >= window->screen->xinerama_infos[i].x_origin
+        && x < window->screen->xinerama_infos[i].x_origin + window->screen->xinerama_infos[i].width
+        && y >= window->screen->xinerama_infos[i].y_origin
+        && y < window->screen->xinerama_infos[i].y_origin + window->screen->xinerama_infos[i].height)
+      {
+        left_strut = 0;
+        right_strut = 0;
+        top_strut = 0;
+        bottom_strut = 0;
+
+        tmp = meta_window_get_workspaces (window);
+
+        while (tmp != NULL)
+        {
+          meta_workspace_get_work_area (tmp->data, &space_area);
+
+          left_strut = MAX (left_strut, space_area.x);
+          right_strut = MAX (right_strut, (window->screen->width - space_area.x - space_area.width));
+          top_strut = MAX (top_strut, space_area.y);
+          bottom_strut = MAX (bottom_strut, (window->screen->height - space_area.y - space_area.height));      
+
+         tmp = tmp->next;
+        }
   
+        left_strut += window->screen->xinerama_infos[i].x_origin;
+        right_strut += window->screen->width - window->screen->xinerama_infos[i].width - window->screen->xinerama_infos[i].x_origin;
+        top_strut += window->screen->xinerama_infos[i].y_origin;
+        bottom_strut += window->screen->height - window->screen->xinerama_infos[i].height - window->screen->xinerama_infos[i].y_origin;
+
+        new_x = left_strut + window->frame->child_x;
+        new_y = top_strut + window->frame->child_y;
+        new_w = window->screen->width - left_strut - right_strut - window->frame->child_x - window->frame->right_width;
+        new_h = window->screen->height - top_strut - bottom_strut - window->frame->child_y - window->frame->bottom_height;
+
+        if (new_x != window->display->grab_initial_window_pos.x
+          || new_y != window->display->grab_initial_window_pos.y)
+        {
+          window->maximized = FALSE;
+          meta_window_move_resize(window, TRUE, new_x, new_y, new_w, new_h);
+          window->maximized = TRUE;
+          set_net_wm_state (window);
+        }
+
+        return;
+      }
+    }
+
+    /* no head found but don't allow standard movements */
+    return;
+  }  
+
   dx = x - window->display->grab_current_root_x;
   dy = y - window->display->grab_current_root_y;
 
Only in metacity-2.4.3-multihead/src: window.c~
diff -u -p -r metacity-2.4.3/src/window.h metacity-2.4.3-multihead/src/window.h
--- metacity-2.4.3/src/window.h	2002-10-24 07:20:52.000000000 +0200
+++ metacity-2.4.3-multihead/src/window.h	2002-11-16 10:24:26.000000000 +0100
@@ -266,7 +266,7 @@ struct _MetaWindow
   MetaGroup *cached_group;
 };
 
-#define META_WINDOW_ALLOWS_MOVE(w)     ((w)->has_move_func && !(w)->maximized && !(w)->fullscreen)
+#define META_WINDOW_ALLOWS_MOVE(w)     ((w)->has_move_func && !(w)->fullscreen)
 #define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w)   ((w)->has_resize_func && !(w)->maximized && !(w)->fullscreen && !(w)->shaded)
 #define META_WINDOW_ALLOWS_RESIZE(w)   (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) &&                \
                                         (((w)->size_hints.min_width < (w)->size_hints.max_width) ||  \
Only in metacity-2.4.3-multihead/src: window.h~
