Leave/enter frames like in spatial move
authorMichaël Cadilhac <michael@cadilhac.name>
Fri, 13 Dec 2013 21:16:42 +0000 (13 22:16 +0100)
committerPhilippe Brochard <pbrochard@common-lisp.net>
Fri, 13 Dec 2013 21:16:42 +0000 (13 22:16 +0100)
src/clfswm-circulate-mode.lisp

index 8f1a1bd..957684a 100644 (file)
 
 
 (defun reorder-brother-simple (reorder-fun)
-  (unless (child-root-p (current-child))
+  (let ((is-root-p (child-root-p (current-child))))
+    (when is-root-p
+      (leave-frame)
+      (sleep *spatial-move-delay-before*))
     (no-focus)
     (select-current-frame nil)
     (let ((parent-frame (find-parent-frame (current-child))))
         (with-slots (child) parent-frame
           (setf child (funcall reorder-fun child)
                 (current-child) (frame-selected-child parent-frame))))
-      (show-all-children t))))
+      (show-all-children t)
+      (when is-root-p
+        (sleep *spatial-move-delay-after*)
+        (enter-frame)))))
 
 
 (defun select-next-brother-simple ()