anchor.diff:      (setf *mouse-buttons* buttons)
       ;; Dispatch events and stuff...
       ;; Raise windows when clicked on, deal with drag, etc.
  -    (when (and (not (logbitp 0 buttons))
  -               (logbitp 0 changes))
  -      ;; On left click release, select window.
  -      (let ((win (window-at-point *mouse-x* *mouse-y*)))
  -        (when (and win (not (eql win *active-window*)))
  -          (when *active-window*
  -            (send-event *active-window* (make-instance 'window-activation-event
  -                                                       :window *active-window*
  -                                                       :state nil)))
  -          (setf *active-window* win)
  -          (send-event win (make-instance 'window-activation-event
  -                                         :window win
  -                                         :state t))
  -          (when (not (eql (layer win) :bottom))
  -            (setf *window-list* (remove win *window-list*))
  -            (push win *window-list*)
  -            ;; Layering change, redraw everything.
  -            ;; fixme: don't be lazy. set the cliprect properly.
  -            (setf *clip-rect-width* (mezzanine.supervisor:framebuffer-width *main-screen*)
  -                  *clip-rect-height* (mezzanine.supervisor:framebuffer-height *main-screen*)
  -                  *clip-rect-x* 0
  -                  *clip-rect-y* 0)))))
  -    (when (or (not (zerop x-motion))
  -              (not (zerop y-motion))
  -              (not (zerop changes)))
  -      (let ((win (window-at-point *mouse-x* *mouse-y*)))
  -        (when win
  -          (send-event win (make-instance 'mouse-event
  -                                         :window win
  -                                         :button-state *mouse-buttons*
  -                                         :button-change changes
  -                                         :x-position (- *mouse-x* (window-x win))
  -                                         :y-position (- *mouse-y* (window-y win))
  -                                         :x-motion x-motion
  -                                         :y-motion y-motion)))))
  +    (let ((win (window-at-point *mouse-x* *mouse-y*)))
  +      (when win
  +        (when (and (logbitp 0 buttons)
  +                   (logbitp 0 changes)
  +                   (member :meta *keyboard-modifier-state*)
  +                   (not (eql (layer win) :bottom)))
  +          ;; Meta + left down, start a passive drag.
  +          (setf *drag-x-origin* *mouse-x*
  +                *drag-y-origin* *mouse-y*
  +                *drag-window* win
  +                (values *drag-x* *drag-y*) (screen-to-window-coordinates win *mouse-x* *mouse-y*)
  +                *passive-drag* t)
  +          (activate-window win))
  +        (when (and (not (logbitp 0 buttons))
  +                   (logbitp 0 changes)
  +                   (not (eql win *active-window*)))
  +          ;; On left click release, select window.
  +          (activate-window win))
  +        (when (and win
  +                   (or (not (zerop x-motion))
  +                       (not (zerop y-motion))
  +                       (not (zerop changes))))
  +          (multiple-value-bind (win-x win-y)
  +              (screen-to-window-coordinates win *mouse-x* *mouse-y*)
  +            (send-event win (make-instance 'mouse-event
  +                                           :window win
  +                                           :button-state *mouse-buttons*
  +                                           :button-change changes
  +                                           :x-position win-x
  +                                           :y-position win-y
  +                                           :x-motion x-motion
  +                                           :y-motion y-motion))))))
       (when (or (not (zerop x-motion))
                 (not (zerop y-motion)))
  +      (when *drag-window*
  +        (expand-clip-rectangle-by-window *drag-window*)
  +        ;; Use clipped mouse coordinates instead of relative motion.
  +        (setf (window-x *drag-window*) (- *mouse-x* *drag-x*))
  +        (setf (window-y *drag-window*) (- *mouse-y* *drag-y*))
  +        (expand-clip-rectangle-by-window *drag-window*))
         ;; Mouse position changed, redraw the screen.
         (expand-clip-rectangle old-x old-y (array-dimension *mouse-pointer* 1) (array-dimension *mouse-pointer* 0))
  -      (expand-clip-rectangle new-x new-y (array-dimension *mouse-pointer* 1) (array-dimension *mouse-pointer* 0)))))
  +      (expand-clip-rectangle new-x new-y (array-dimension *mouse-pointer* 1) (array-dimension *mouse-pointer* 0)))
  +    (when (and (not (logbitp 0 buttons))
  +               (logbitp 0 changes)
  +               *drag-window*)
  +      ;; Left click release, stop drag.
  +      (setf *drag-window* nil))))
   
   (defun submit-mouse (buttons x-motion y-motion)
     "Submit a mouse event into the input system."
  
positive.code: (defvar *mouse-y* 0)
  (defvar *mouse-buttons* 0)
  
  (defmethod process-event ((event mouse-event))
    ;; Update positions and buttons
    (let* ((buttons (mouse-button-state event))
  
negative.code: 
  (defmethod process-event ((event damage-event))
    (let ((window (window event)))
      (multiple-value-bind (win-x win-y)
          (window-to-screen-coordinates window (x event) (y event))
        (multiple-value-bind (clip-x clip-y clip-w clip-h)
            (clip-rectangle win-x win-y (width event) (height event)
                            (window-x window) (window-y window) (width window) (height window))
          (expand-clip-rectangle clip-x clip-y clip-w clip-h)))))
  
  (defun damage-window (window x y width height)
    "Send a window damage event to the compositor."
  