anchor.diff:    ;; Eat unknown events.
     (:method (w e)))
   
  +(defmethod dispatch-event (window (event mezzano.gui.compositor:resize-event))
  +  (let ((old-width (mezzano.gui.compositor:width (window window)))
  +        (old-height (mezzano.gui.compositor:height (window window)))
  +        (new-width (mezzano.gui.compositor:width event))
  +        (new-height (mezzano.gui.compositor:height event)))
  +    #+(or)
  +    (when (and (eql old-width new-width)
  +               (eql old-height new-height))
  +      (return-from dispatch-event))
  +    (format t "Resize from ~S,~S to ~S,~S~%"
  +            old-width old-height
  +            new-width new-height)))
  +
   (defmethod dispatch-event (window (event mezzano.gui.compositor:window-activation-event))
     (setf (mezzano.gui.widgets:activep (frame window)) (mezzano.gui.compositor:state event))
     (mezzano.gui.widgets:draw-frame (frame window)))
  
positive.code:          (loop
              ;; Catch up with window manager events.
              (pump-event-loop stream)
              (when (window-closed stream)
                (return :eof))
              ;; Check for an available character.
  
negative.code:   (mezzano.gui.widgets:frame-mouse-event (frame window) event))
  
  (defmethod dispatch-event (window (event mezzano.gui.compositor:window-close-event))
    (throw 'mezzano.supervisor:terminate-thread nil))
  
  (defmethod dispatch-event (app (event mezzano.gui.compositor:resize-request-event))
    (let ((old-width (mezzano.gui.compositor:width (window app)))
          (old-height (mezzano.gui.compositor:height (window app)))
          (new-width (max 100 (mezzano.gui.compositor:width event)))
          (new-height (max 100 (mezzano.gui.compositor:height event))))
      (when (or (not (eql old-width new-width))
                (not (eql old-height new-height)))
        (let ((new-framebuffer (mezzano.gui:make-surface
                                new-width new-height)))
          (mezzano.gui.widgets:resize-frame (frame app) new-framebuffer)
          (mezzano.gui.compositor:resize-window
           (window app) new-framebuffer
           :origin (mezzano.gui.compositor:resize-origin event))))))
  
  (defmethod dispatch-event (app (event mezzano.gui.compositor:resize-event))
    (let* ((window (window app))
           (fb (mezzano.gui.compositor:window-buffer window))
           (frame (frame app))
           (new-width (mezzano.gui:surface-width fb))
           (new-height (mezzano.gui:surface-height fb)))
      (mezzano.gui.widgets:resize-text-widget
       app
       fb
       (nth-value 0 (mezzano.gui.widgets:frame-size frame))
       (nth-value 2 (mezzano.gui.widgets:frame-size frame))
       (- (mezzano.gui.compositor:width window)
          (nth-value 0 (mezzano.gui.widgets:frame-size frame))
          (nth-value 1 (mezzano.gui.widgets:frame-size frame)))
       (- (mezzano.gui.compositor:height window)
          (nth-value 2 (mezzano.gui.widgets:frame-size frame))
          (nth-value 3 (mezzano.gui.widgets:frame-size frame))))))
  
  (defun pump-event-loop (window)
    "Read & dispatch window events until there are no more waiting events."
  