anchor.diff:  
   (defmethod process-event ((event damage-event))
     (let ((window (window event)))
  -    (multiple-value-bind (x y w h)
  -        (clip-rectangle (x event) (y event) (width event) (height event)
  -                        0 0 (width window) (height window))
  -      (expand-clip-rectangle (+ x (window-x window)) (+ y (window-y window))
  -                             w h))))
  +    (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."
  
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:           *clip-rect-height* (- y2 *clip-rect-y*))
      #+debug-dirty-rects(format t "Expanded clip rect to ~D,~D ~D,~D~%"
              *clip-rect-x* *clip-rect-y* *clip-rect-width* *clip-rect-height*)))
  
  (defun expand-clip-rectangle-by-window (window)
    (expand-clip-rectangle (window-x window) (window-y window)
                           (width window) (height window)))
  
  (defun screen-to-window-coordinates (window x y)
    "Convert the screen-relative X,Y coordinates to window-relative coordinates."
    (values (- x (window-x window))
            (- y (window-y window))))
  
  (defun window-to-screen-coordinates (window x y)
    "Convert the window-relative X,Y coordinates to screen-relative coordinates."
    (values (+ x (window-x window))
            (+ y (window-y window))))
  
  (defun 2d-array (data &optional (element-type 't))
    (let* ((width (length (first data)))
  