[sawfish/edge-actions] improved previous commit



commit bbad196c68eb90c7520d4238bdebc3e2d1f8066f
Author: Christopher Roy Bratusek <zanghar freenet de>
Date:   Sat Nov 6 09:52:24 2010 +0100

    improved previous commit

 lisp/sawfish/wm/edge/actions.jl |   31 ++++++++++---------------------
 1 files changed, 10 insertions(+), 21 deletions(-)
---
diff --git a/lisp/sawfish/wm/edge/actions.jl b/lisp/sawfish/wm/edge/actions.jl
index 6bd1bd4..e150ca7 100644
--- a/lisp/sawfish/wm/edge/actions.jl
+++ b/lisp/sawfish/wm/edge/actions.jl
@@ -124,27 +124,16 @@
 		  (mod edge-actions-delay 1000)))))))
 
   (define (edge-action-move-init)
-    (let ((corner (get-active-corner))
-	  (edge (get-active-edge)))
-      (if corner
-	  (hot-spot-activate corner)
-	(setq func nil)
-	(cond ((eq edge 'left)
-	       (make-timer (lambda () (edge-action-call left-edge-move-func edge))
-		  (quotient edge-actions-delay 1000)
-		  (mod edge-actions-delay 1000)))
-	      ((eq edge 'right)
-               (make-timer (lambda () (edge-action-call right-edge-move-func edge))
-		  (quotient edge-actions-delay 1000)
-		  (mod edge-actions-delay 1000)))
-	      ((eq edge 'top)
-	       (make-timer (lambda () (edge-action-call top-edge-move-func edge))
-		  (quotient edge-actions-delay 1000)
-		  (mod edge-actions-delay 1000)))
-	      ((eq edge 'bottom)
-	       (make-timer (lambda () (edge-action-call bottom-edge-move-func edge))
-		  (quotient edge-actions-delay 1000)
-		  (mod edge-actions-delay 1000)))))))
+    (setq func nil)
+    (case (get-active-edge)
+      ((left)
+       (edge-action-call left-edge-move-func 'left))
+      ((right)
+       (edge-action-call right-edge-move-func 'right))
+      ((top)
+       (edge-action-call top-edge-move-func 'top))
+      ((bottom)
+       (edge-action-call bottom-edge-move-func 'bottom))))
 
   (define (edges-activate)
     (if edge-actions-enabled



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]