anchor.diff:              nconc (loop for id in (xlib:get-property w :WM_TRANSIENT_FOR)
                           when (= id (xlib:window-id window))
                             collect w))
  -    (window-error (c) nil)))
  +    (window-error (c) (declare (ignore c)) nil)
  +    (match-error (c)
  +      (format t "~&get-transients-of: ~a ~a~%" c window)
  +      nil)))
   
   (defun %focus (window)
  -  "Low level focus for *one* managed window."
  -  (setf (xlib:window-priority window) :above)
  -  (dolist (w (get-transients-of window))
  -    (setf (xlib:window-priority w) :above)))
  +  "Focus one window and its family if needed."
  +  (labels ((up (win)
  +             (setf (xlib:window-priority win) :above)
  +             (dolist (w (get-transients-of win))
  +               (setf (xlib:window-priority w) :above))))
  +    (let ((family (sort (family window) #'< :key #'xlib:window-id)))
  +      (cond (family
  +             ;; focus every other family members and set input
  +             ;; focus as follow mouse
  +             (unless (member *curr* family :test #'win=)
  +               (setf *last* *curr*
  +                     *curr* (first family)))
  +             (dolist (w family) (up w))
  +             (xlib:set-input-focus *display* :pointer-root :pointer-root))
  +            (t
  +             ;; set input focus to window
  +             (unless (win= *curr* window)
  +               (setf *last* *curr*
  +                     *curr* window))
  +             (xlib:set-input-focus *display* window :pointer-root)))
  +          (up window))))
  +
  +(defparameter *one-group-at-a-time* t "Should the focus shows one group at a time")
   
   (defun same-group (window)
     "Return a list of windows in the same group as `window'."
  
positive.code:   (and (xlib:window-p a) (xlib:window-p b) (xlib:window-equal a b)))
  
  (defun family (window)
    "Get the family function of a window if there is one."
    (and window (restart-case (find-if #'(lambda (f) (funcall f window)) *families*)
                  (window-error (c) nil))))
  
  (defun get-transients-of (window)
    (restart-case
  
negative.code: 
    (unwind-protect (handler-bind ((xlib:window-error #'restart-window-error)
                                   (xlib:drawable-error #'restart-drawable-error)
                                   (xlib:match-error #'restart-match-error)
                                   (xlib:value-error #'restart-value-error)
                                   (simple-error #'restart-simple-error))
                      (evloop))
  