[sawfish/edge-actions] when performing edge-action while moving, make sure the edge-action for hitting is not called, too.



commit cfeb01f9a99a1811d5899a9f4ded19942d3d81bf
Author: Christopher Roy Bratusek <zanghar freenet de>
Date:   Sat Nov 6 10:43:49 2010 +0100

    when performing edge-action while moving,
    make sure the edge-action for hitting is not called, too.

 lisp/sawfish/wm/edge/actions.jl |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/lisp/sawfish/wm/edge/actions.jl b/lisp/sawfish/wm/edge/actions.jl
index e150ca7..e9d0c1a 100644
--- a/lisp/sawfish/wm/edge/actions.jl
+++ b/lisp/sawfish/wm/edge/actions.jl
@@ -36,6 +36,7 @@
   (define-structure-alias edge-actions sawfish.wm.edge.actions)
 
   (define func nil)
+  (define no-enter nil)
 
   (defcustom edge-actions-enabled nil
     "Activate the screen-edges."
@@ -101,6 +102,7 @@
        (edge-flip-activate edge 'viewport))))
 
   (define (edge-action-init)
+    (unless no-enter
     (let ((corner (get-active-corner))
 	  (edge (get-active-edge)))
       (if corner
@@ -121,10 +123,11 @@
 	      ((eq edge 'bottom)
 	       (make-timer (lambda () (edge-action-call bottom-edge-func edge))
 		  (quotient edge-actions-delay 1000)
-		  (mod edge-actions-delay 1000)))))))
+		  (mod edge-actions-delay 1000))))))))
 
   (define (edge-action-move-init)
     (setq func nil)
+    (setq no-enter t)
     (case (get-active-edge)
       ((left)
        (edge-action-call left-edge-move-func 'left))
@@ -133,7 +136,8 @@
       ((top)
        (edge-action-call top-edge-move-func 'top))
       ((bottom)
-       (edge-action-call bottom-edge-move-func 'bottom))))
+       (edge-action-call bottom-edge-move-func 'bottom)))
+    (setq no-enter nil))
 
   (define (edges-activate)
     (if edge-actions-enabled



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