anchor.diff:                 (:destroy-notify
                   (event-window window)
                   (unless (window-equal event-window window)
  +                  (when (win= window *last*)
  +                    (setf *last* (next #'1+ *last*)))
                     (setf *windows* (rrem window *windows* :test #'window-equal))
  -                  (when (win= window *last*)
  -                    (setf *last* (when (listp *last*)
  -                                   (rrem window *last* :test #'window-equal))))))))
  +                  (when (win= window *curr*)
  +                    (let ((newcurr (find-if #'(lambda (w) (win= w *curr*)) *windows*)))
  +                      (setf *curr* (if newcurr newcurr (randomth *windows*)))))))))
         (ungrab-button *root* (code *move*) :modifiers (state *move*))
         (ungrab-button *root* (code *resize*) :modifiers (state *resize*))
         (ungrab-button *root* (code *kill*) :modifiers (state *kill*))
  
positive.code:     `(let ((,sc (compile-shortcut ',key)))
         (pushnew (cons ,sc #'(lambda () ,@body)) *shortcuts* :test #'equal :key #'car))))
  
  (defun has-focus ()
    "Return a window (or list of) where the focus is."
    (let ((w (input-focus *display*)))
      (find w *windows* :test #'win=)))
  
  (defmethod focus :before (window)
    (let ((curr (has-focus)))
      (setf *last* (if curr curr *curr*)
            *curr* window)))
  
  (defmethod focus ((window window))
    (when (eql (window-map-state window) :viewable)
  
negative.code: (defmethod win= ((a window) (b list)) (loop for w in b thereis (window-equal w a)))
  (defmethod win= ((a list) (b list)) (loop for w in a thereis (win= w b)))
  
  (defun next (&optional (way #'1+) (window *curr*))
    (when *windows*
      (let* ((nw (or (position window *windows* :test #'win=) 0))
             (n (length *windows*))
  