? metacity-2.4.1-snap-patch-unified.diff
? metacity-2.4.1-snap-patch.diff
? metacity-2.4.1-windowmovement.diff
Index: src/display.c
===================================================================
RCS file: /cvs/gnome/metacity/src/display.c,v
retrieving revision 1.161
diff -u -r1.161 display.c
--- src/display.c	4 Nov 2002 00:56:12 -0000	1.161
+++ src/display.c	4 Nov 2002 17:37:57 -0000
@@ -1147,7 +1147,7 @@
               if (!unmodified)
                 begin_move = TRUE;
             }
-          else if (!unmodified && event->xbutton.button == 2)
+          else if (!unmodified && event->xbutton.button == 3)
             {
               if (window->has_resize_func)
                 {
@@ -1182,7 +1182,7 @@
                                               event->xbutton.y_root);
                 }
             }
-          else if (event->xbutton.button == 3)
+          else if (event->xbutton.button == 2)
             {
               meta_window_show_menu (window,
                                      event->xbutton.x_root,
Index: src/window.c
===================================================================
RCS file: /cvs/gnome/metacity/src/window.c,v
retrieving revision 1.242
diff -u -r1.242 window.c
--- src/window.c	4 Nov 2002 00:19:08 -0000	1.242
+++ src/window.c	4 Nov 2002 17:37:58 -0000
@@ -6041,11 +6041,18 @@
   new_x = window->display->grab_current_window_pos.x + dx;
   new_y = window->display->grab_current_window_pos.y + dy;
 
-  if (mask & ShiftMask)
+  if (!(mask & ShiftMask))
     {
+      #define SNAP_THRESHOLD 10
+      int nx,ny;
+      
       /* snap to edges */
-      new_x = meta_window_find_nearest_vertical_edge (window, new_x);
-      new_y = meta_window_find_nearest_horizontal_edge (window, new_y);
+      nx = meta_window_find_nearest_vertical_edge (window, new_x);
+      ny = meta_window_find_nearest_horizontal_edge (window, new_y);
+      if(ABS(nx - new_x) < SNAP_THRESHOLD)
+        new_x = nx;
+      if(ABS(ny - new_y) < SNAP_THRESHOLD)
+        new_y = ny;
     }
 
   /* Force a move regardless of time if a certain delta is exceeded,
