[sawfish/sawfish-2.90] make infinite-desktop work while moving a window



commit 1fd8610f855da39e6c984dc9ff72ee3796910438
Author: Christopher Roy Bratusek <zanghar freenet de>
Date:   Thu Oct 28 19:10:01 2010 +0200

    make infinite-desktop work while moving a window

 ChangeLog                                |    3 +++
 lisp/sawfish/wm/edge/infinite-desktop.jl |   11 ++++++++++-
 2 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d574601..65820a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2010-10-29  Christopher Bratusek <zanghar freenet de>
+	* lisp/sawfish/wm/edge/infinite-desktop.jl: make infinite-desktop work while moving a window
+
 2010-10-26  Christopher Bratusek <zanghar freenet de>
 	* lisp/sawfish/wm/commands/jump-or-exec.jl: added toggle-or-exec wrapper
 	                                            updated introduction part
diff --git a/lisp/sawfish/wm/edge/infinite-desktop.jl b/lisp/sawfish/wm/edge/infinite-desktop.jl
index ba28a22..9c57035 100644
--- a/lisp/sawfish/wm/edge/infinite-desktop.jl
+++ b/lisp/sawfish/wm/edge/infinite-desktop.jl
@@ -108,21 +108,30 @@ left."
 
   (define (infinite-desktop-hook)
     "Called when a desktop flipper is triggered to shift the visible desktop."
-    (let ((edge (get-active-edge)))  
+    (let ((edge (get-active-edge)))
       (cond ((eq edge 'right) (infinite-desktop-move-right))
             ((eq edge 'left) (infinite-desktop-move-left))
             ((eq edge 'bottom) (infinite-desktop-move-bottom))
             ((eq edge 'top) (infinite-desktop-move-top)))))
 
+  (define (infinite-desktop-while-moving w)
+    (declare (unused w))
+    (if infinite-desktop-p
+        (infinite-desktop-hook)))
+
   (define (infinite-desktop-enable)
     "Turn on infinite-desktop if `infinite-desktop-p' is true."
     (if infinite-desktop-p
         (progn
 	  (unless (in-hook-p 'enter-flipper-hook infinite-desktop-hook)
             (add-hook 'enter-flipper-hook infinite-desktop-hook))
+	  (unless (in-hook-p 'while-moving-hook infinite-desktop-while-moving)
+	    (add-hook 'while-moving-hook infinite-desktop-while-moving))
 	  (flippers-activate t))
       (if (in-hook-p 'enter-flipper-hook infinite-desktop-hook)
 	(remove-hook 'enter-flipper-hook infinite-desktop-hook)
+      (if (in-hook-p 'while-moving-hook infinite-desktop-while-moving)
+	(remove-hook 'while-moving-hook infinite-desktop-while-moving))
       (flippers-activate nil))))
 
 (unless batch-mode



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