anchor.diff:    (handler-case
         (mezzano.gui.widgets:frame-mouse-event (frame app) event)
       (mezzano.gui.widgets:close-button-clicked ()
  -      (throw 'quit nil))))
  +      (throw 'quit nil)))
  +  ;; Tab clicky clicky.
  +  (when (and (not (logbitp 0 (mezzano.gui.compositor:mouse-button-state event)))
  +             (logbitp 0 (mezzano.gui.compositor:mouse-button-change event)))
  +    (multiple-value-bind (left right top bottom)
  +        (mezzano.gui.widgets:frame-size (frame app))
  +      (declare (ignore bottom))
  +      (let* ((mx (mezzano.gui.compositor:mouse-x-position event))
  +             (my (mezzano.gui.compositor:mouse-y-position event))
  +             (fb (mezzano.gui.compositor:window-buffer
  +                  (window app)))
  +             (width (- (mezzano.gui:surface-width fb) left right))
  +             (half-width (truncate width 2))
  +             (line-height (mezzano.gui.font:line-height (font app))))
  +        (when (and (<= left mx (+ left half-width))
  +                   (<= top my (+ top line-height)))
  +          (setf (mode app) :graphs)
  +          (throw 'redraw nil))
  +        (when (and (<= (+ left half-width) mx (+ left width right))
  +                   (<= top my (+ top line-height)))
  +          (setf (mode app) :physical-visualizer)
  +          (throw 'redraw nil))))))
   
   (defmethod dispatch-event (app (event mezzano.gui.compositor:window-close-event))
     (throw 'quit nil))
  
positive.code:                                      :fifo fifo
                                       :window window
                                       :frame frame
                                       :mode :graphs
                                       :samplers (list (make-instance 'graph-sampler
                                                                      :function 'general-area-usage
                                                                      :colour theme:*memory-monitor-general-area-usage*
                                                                      :name "General area usage")
                                                       (make-instance 'graph-sampler
                                                                      :function 'general-area-alloc
                                                                      :colour theme:*memory-monitor-general-area-alloc*
                                                                      :name "General area bytes allocated"
                                                                      :scale t)
                                                       (make-instance 'graph-sampler
                                                                      :function 'general-area-commit
                                                                      :colour theme:*memory-monitor-general-area-commit*
                                                                      :name "General area bytes committed"
                                                                      :scale t)
                                                       (make-instance 'graph-sampler
                                                                      :function 'cons-area-usage
                                                                      :colour theme:*memory-monitor-cons-area-usage*
                                                                      :name "Cons area usage")
                                                       (make-instance 'graph-sampler
                                                                      :function 'cons-area-alloc
                                                                      :colour theme:*memory-monitor-cons-area-alloc*
                                                                      :name "Cons area bytes allocated"
                                                                      :scale t)
                                                       (make-instance 'graph-sampler
                                                                      :function 'cons-area-commit
                                                                      :colour theme:*memory-monitor-cons-area-commit*
                                                                      :name "Cons area bytes committed"
                                                                      :scale t)
                                                       (make-instance 'graph-sampler
                                                                      :function 'pinned-area-usage
                                                                      :colour theme:*memory-monitor-pinned-area-usage*
                                                                      :name "Pinned area usage")
                                                       (make-instance 'graph-sampler
                                                                      :function 'wired-area-usage
                                                                      :colour theme:*memory-monitor-wired-area-usage*
                                                                      :name "Wired area usage")
                                                       (make-instance 'graph-sampler
                                                                      :function 'function-area-usage
                                                                      :colour theme:*memory-monitor-function-area-usage*
                                                                      :name "Function area usage")
                                                       (make-instance 'graph-sampler
                                                                      :function 'wired-function-area-usage
                                                                      :colour theme:*memory-monitor-wired-function-area-usage*
                                                                      :name "Wired function area usage")))))
              (mezzano.gui.widgets:draw-frame frame)
              (mezzano.gui.compositor:damage-window window
                                                    0 0
  
negative.code:            (t                   #x200)))
          (t 0)))
  
  (defun draw-tab-bar (app)
    (multiple-value-bind (left right top bottom)
        (mezzano.gui.widgets:frame-size (frame app))
      (declare (ignore bottom))
      (let* ((fb (mezzano.gui.compositor:window-buffer
                  (window app)))
             (width (- (mezzano.gui:surface-width fb) left right))
             (half-width (truncate width 2))
             (font (font app))
             (line-height (mezzano.gui.font:line-height font)))
        (mezzano.gui:bitset :set
                            width 1
                            mezzano.gui.theme:*foreground*
                            fb left (+ top line-height))
        (multiple-value-bind (graphs-colour pv-colour)
            (ecase (mode app)
              (:physical-visualizer
               (values mezzano.gui.theme:*background* mezzano.gui.theme:*foreground*))
              (:graphs
               (values mezzano.gui.theme:*foreground* mezzano.gui.theme:*background*)))
          (mezzano.gui:bitset :set
                              half-width line-height
                              graphs-colour
                              fb left top)
          (mezzano.gui:bitset :set
                              half-width line-height
                              pv-colour
                              fb (+ left half-width) top)
          (flet ((draw-string* (string offset colour)
                   (let ((swidth (string-display-width string font)))
                     (draw-string string font
                                  fb
                                  (+ left offset (truncate half-width 2) (- (truncate swidth 2)))
                                  (+ top (mezzano.gui.font:ascender font))
                                  colour))))
            (draw-string* "Graphs" 0 pv-colour)
            (draw-string* "Physical Vizualizer" half-width graphs-colour)))
        (1+ (mezzano.gui.font:line-height font)))))
  
  (defun update-display (app x y w h)
    (let ((tb-height (draw-tab-bar app)))
      (incf y tb-height)
      (decf h tb-height))
    (let* ((fb (mezzano.gui.compositor:window-buffer
                (window app)))
           (n-pixels (* w h))
           (flag-array (make-array n-pixels :initial-element 0)))
      ;; Get page flags for each pixel.
      (mezzano.supervisor:with-pseudo-atomic ()
  