Only in metacity-cvs-shakeloose-04-maxconstraint-02-titlebar-04: metacity-cvs
diff -X /usr/src/metacity/.diffignore -rudp metacity-cvs-shakeloose-04-maxconstraint-02/src/constraints.c metacity-cvs-shakeloose-04-maxconstraint-02-titlebar-04/src/constraints.c
--- metacity-cvs-shakeloose-04-maxconstraint-02/src/constraints.c	2006-10-03 14:18:25.000000000 +0200
+++ metacity-cvs-shakeloose-04-maxconstraint-02-titlebar-04/src/constraints.c	2006-10-03 20:55:42.000000000 +0200
@@ -1373,13 +1373,10 @@ constrain_titlebar_visible (MetaWindow  
     return TRUE;
 
   /* Allow the titlebar beyond the top of the screen only if the user wasn't
-   * clicking on the titlebar to start the move.
-   * FIXME: This is kind of a hack; nearly as ugly as the old infinite edge
-   * resistance.
+   * clicking on the frame to start the move.
    */
   unconstrained_user_action =
-    info->is_user_action &&
-    window->display->grab_anchor_root_y >= window->display->grab_initial_window_pos.y;
+    info->is_user_action && !window->display->grab_frame_action;
 
   /* Exit early if we know the constraint won't apply--note that this constraint
    * is only meant for normal windows (e.g. we don't want docks to be shoved 
diff -X /usr/src/metacity/.diffignore -rudp metacity-cvs-shakeloose-04-maxconstraint-02/src/core.c metacity-cvs-shakeloose-04-maxconstraint-02-titlebar-04/src/core.c
--- metacity-cvs-shakeloose-04-maxconstraint-02/src/core.c	2006-10-12 15:49:31.000000000 +0200
+++ metacity-cvs-shakeloose-04-maxconstraint-02-titlebar-04/src/core.c	2006-10-12 15:50:03.000000000 +0200
@@ -630,6 +630,7 @@ meta_core_begin_grab_op (Display    *xdi
                          Window      frame_xwindow,
                          MetaGrabOp  op,
                          gboolean    pointer_already_grabbed,
+                         gboolean    frame_action,
                          int         event_serial,
                          int         button,
                          gulong      modmask,
@@ -648,6 +649,7 @@ meta_core_begin_grab_op (Display    *xdi
   
   return meta_display_begin_grab_op (display, screen, window,
                                      op, pointer_already_grabbed,
+                                     frame_action,
                                      event_serial,
                                      button, modmask,
                                      timestamp, root_x, root_y);
diff -X /usr/src/metacity/.diffignore -rudp metacity-cvs-shakeloose-04-maxconstraint-02/src/core.h metacity-cvs-shakeloose-04-maxconstraint-02-titlebar-04/src/core.h
--- metacity-cvs-shakeloose-04-maxconstraint-02/src/core.h	2006-10-12 15:49:31.000000000 +0200
+++ metacity-cvs-shakeloose-04-maxconstraint-02-titlebar-04/src/core.h	2006-10-12 15:50:03.000000000 +0200
@@ -150,6 +150,7 @@ gboolean   meta_core_begin_grab_op (Disp
                                     Window      frame_xwindow,
                                     MetaGrabOp  op,
                                     gboolean    pointer_already_grabbed,
+                                    gboolean    frame_action,
                                     int         event_serial,
                                     int         button,
                                     gulong      modmask,
diff -X /usr/src/metacity/.diffignore -rudp metacity-cvs-shakeloose-04-maxconstraint-02/src/display.c metacity-cvs-shakeloose-04-maxconstraint-02-titlebar-04/src/display.c
--- metacity-cvs-shakeloose-04-maxconstraint-02/src/display.c	2006-10-03 14:18:26.000000000 +0200
+++ metacity-cvs-shakeloose-04-maxconstraint-02-titlebar-04/src/display.c	2006-10-03 20:55:42.000000000 +0200
@@ -1738,6 +1738,7 @@ event_callback (XEvent   *event,
                                                 window,
                                                 op,
                                                 TRUE,
+                                                FALSE,
                                                 event->xbutton.serial,
                                                 event->xbutton.button,
                                                 0,
@@ -1795,6 +1796,7 @@ event_callback (XEvent   *event,
                                           window,
                                           META_GRAB_OP_MOVING,
                                           TRUE,
+                                          FALSE,
                                           event->xbutton.serial,
                                           event->xbutton.button,
                                           0,
@@ -3263,6 +3265,7 @@ meta_display_begin_grab_op (MetaDisplay 
                             MetaWindow  *window,
                             MetaGrabOp   op,
                             gboolean     pointer_already_grabbed,
+                            gboolean     frame_action,
                             int          event_serial,
                             int          button,
                             gulong       modmask,
@@ -3380,7 +3383,8 @@ meta_display_begin_grab_op (MetaDisplay 
   display->grab_last_user_action_was_snap = FALSE;
 #endif
   display->grab_was_cancelled = FALSE;
-  
+  display->grab_frame_action = frame_action;
+
   if (display->grab_resize_timeout_id)
     {
       g_source_remove (display->grab_resize_timeout_id);
diff -X /usr/src/metacity/.diffignore -rudp metacity-cvs-shakeloose-04-maxconstraint-02/src/display.h metacity-cvs-shakeloose-04-maxconstraint-02-titlebar-04/src/display.h
--- metacity-cvs-shakeloose-04-maxconstraint-02/src/display.h	2006-10-03 14:18:26.000000000 +0200
+++ metacity-cvs-shakeloose-04-maxconstraint-02-titlebar-04/src/display.h	2006-10-03 20:55:42.000000000 +0200
@@ -264,6 +264,7 @@ struct _MetaDisplay
   guint       grab_have_keyboard : 1;
   guint       grab_wireframe_active : 1;
   guint       grab_was_cancelled : 1;    /* Only used in wireframe mode */
+  guint       grab_frame_action : 1;
   MetaRectangle grab_wireframe_rect;
   MetaRectangle grab_wireframe_last_xor_rect;
   MetaRectangle grab_initial_window_pos;
@@ -446,6 +447,7 @@ gboolean meta_display_begin_grab_op (Met
                                      MetaWindow  *window,
                                      MetaGrabOp   op,
                                      gboolean     pointer_already_grabbed,
+                                     gboolean     frame_action,
                                      int          event_serial,
                                      int          button,
                                      gulong       modmask,
diff -X /usr/src/metacity/.diffignore -rudp metacity-cvs-shakeloose-04-maxconstraint-02/src/frames.c metacity-cvs-shakeloose-04-maxconstraint-02-titlebar-04/src/frames.c
--- metacity-cvs-shakeloose-04-maxconstraint-02/src/frames.c	2006-10-12 15:49:31.000000000 +0200
+++ metacity-cvs-shakeloose-04-maxconstraint-02-titlebar-04/src/frames.c	2006-10-12 15:50:03.000000000 +0200
@@ -1351,6 +1351,7 @@ meta_frames_button_press_event (GtkWidge
                                frame->xwindow,
                                op,
                                TRUE,
+                               TRUE,
                                meta_ui_get_last_event_serial (gdk_display),
                                event->button,
                                0,
@@ -1441,6 +1442,7 @@ meta_frames_button_press_event (GtkWidge
                                  frame->xwindow,
                                  op,
                                  TRUE,
+                                 TRUE,
                                  meta_ui_get_last_event_serial (gdk_display),
                                  event->button,
                                  0,
@@ -1461,6 +1463,7 @@ meta_frames_button_press_event (GtkWidge
                                    frame->xwindow,
                                    META_GRAB_OP_MOVING,
                                    TRUE,
+                                   TRUE,
                                    meta_ui_get_last_event_serial (gdk_display),
                                    event->button,
                                    0,
diff -X /usr/src/metacity/.diffignore -rudp metacity-cvs-shakeloose-04-maxconstraint-02/src/keybindings.c metacity-cvs-shakeloose-04-maxconstraint-02-titlebar-04/src/keybindings.c
--- metacity-cvs-shakeloose-04-maxconstraint-02/src/keybindings.c	2006-10-03 14:18:28.000000000 +0200
+++ metacity-cvs-shakeloose-04-maxconstraint-02-titlebar-04/src/keybindings.c	2006-10-12 17:54:55.000000000 +0200
@@ -3127,6 +3127,7 @@ do_choose_window (MetaDisplay    *displa
                                            tab_op_from_tab_type (type) :
                                            cycle_op_from_tab_type (type),
                                            FALSE,
+                                           FALSE,
                                            event->xkey.serial,
                                            0,
                                            binding->mask,
@@ -3348,6 +3349,7 @@ handle_begin_move         (MetaDisplay  
     {
       meta_window_begin_grab_op (window,
                                  META_GRAB_OP_KEYBOARD_MOVING,
+                                 FALSE,
                                  event->xkey.time);
     }
 }
@@ -3363,6 +3365,7 @@ handle_begin_resize       (MetaDisplay  
     {
       meta_window_begin_grab_op (window,
                                  META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN,
+                                 FALSE,
                                  event->xkey.time);
     }
 }
@@ -3560,6 +3563,7 @@ handle_workspace_switch  (MetaDisplay   
                                   NULL,
                                   META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING,
                                   FALSE,
+                                  FALSE,
                                   event->xkey.serial,
                                   0,
                                   grab_mask,
diff -X /usr/src/metacity/.diffignore -rudp metacity-cvs-shakeloose-04-maxconstraint-02/src/window.c metacity-cvs-shakeloose-04-maxconstraint-02-titlebar-04/src/window.c
--- metacity-cvs-shakeloose-04-maxconstraint-02/src/window.c	2006-10-12 15:49:31.000000000 +0200
+++ metacity-cvs-shakeloose-04-maxconstraint-02-titlebar-04/src/window.c	2006-10-12 17:56:46.000000000 +0200
@@ -4765,6 +4765,13 @@ meta_window_client_message (MetaWindow *
       MetaGrabOp op;
       int button;
       guint32 timestamp;
+
+      /* _NET_WM_MOVERESIZE messages are almost certainly going to come from
+       * clients when users click on the fake "frame" that the client has,
+       * thus we should also treat such messages as though it were a
+       * "frame action".
+       */
+      gboolean const frame_action = TRUE;
       
       x_root = event->xclient.data.l[0];
       y_root = event->xclient.data.l[1];
@@ -4825,7 +4832,7 @@ meta_window_client_message (MetaWindow *
           ((window->has_move_func && op == META_GRAB_OP_KEYBOARD_MOVING) ||
            (window->has_resize_func && op == META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN)))
         {
-          meta_window_begin_grab_op (window, op, timestamp);
+          meta_window_begin_grab_op (window, op, frame_action, timestamp);
         }
       else if (op != META_GRAB_OP_NONE &&
                ((window->has_move_func && op == META_GRAB_OP_MOVING) ||
@@ -4873,7 +4880,9 @@ meta_window_client_message (MetaWindow *
                                           window->screen,
                                           window,
                                           op,
-                                          FALSE, 0 /* event_serial */,
+                                          FALSE,
+                                          frame_action,
+                                          0 /* event_serial */,
                                           button, 0,
                                           timestamp,
                                           x_root,
@@ -6260,12 +6269,14 @@ menu_callback (MetaWindowMenu *menu,
         case META_MENU_OP_MOVE:
           meta_window_begin_grab_op (window,
                                      META_GRAB_OP_KEYBOARD_MOVING,
+                                     TRUE,
                                      timestamp);
           break;
 
         case META_MENU_OP_RESIZE:
           meta_window_begin_grab_op (window,
                                      META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN,
+                                     TRUE,
                                      timestamp);
           break;
 
@@ -8061,6 +8072,7 @@ warp_grab_pointer (MetaWindow          *
 void
 meta_window_begin_grab_op (MetaWindow *window,
                            MetaGrabOp  op,
+                           gboolean    frame_action,
                            guint32     timestamp)
 {
   int x, y;
@@ -8076,6 +8088,7 @@ meta_window_begin_grab_op (MetaWindow *w
                               window,
                               op,
                               FALSE,
+                              frame_action,
                               grab_start_serial /* event_serial */,
                               0 /* button */,
                               0,
diff -X /usr/src/metacity/.diffignore -rudp metacity-cvs-shakeloose-04-maxconstraint-02/src/window.h metacity-cvs-shakeloose-04-maxconstraint-02-titlebar-04/src/window.h
--- metacity-cvs-shakeloose-04-maxconstraint-02/src/window.h	2006-10-12 15:49:32.000000000 +0200
+++ metacity-cvs-shakeloose-04-maxconstraint-02-titlebar-04/src/window.h	2006-10-12 17:50:21.000000000 +0200
@@ -583,6 +583,7 @@ MetaWindow* meta_window_find_root_ancest
 
 void meta_window_begin_grab_op (MetaWindow *window,
                                 MetaGrabOp  op,
+                                gboolean    frame_action,
                                 guint32     timestamp);
 
 void meta_window_update_keyboard_resize (MetaWindow *window,
