window-matcher avoid . nil



Hi all,

I've been playing around with window-matcher avoid . nil and this is what I have:

diff --git a/lisp/sawfish/wm/ext/match-window.jl b/lisp/sawfish/wm/ext/match-window.jl
index bc64cdc..2c309d0 100644
--- a/lisp/sawfish/wm/ext/match-window.jl
+++ b/lisp/sawfish/wm/ext/match-window.jl
@@ -35,6 +35,7 @@
 	    match-window)

     (open rep
+	  rep.io.timers
 	  rep.system
 	  rep.regexp
 	  sawfish.wm
@@ -472,6 +473,14 @@
       (declare (unused prop))
       (set-focus-mode w value)))

+  (define-match-window-setter 'avoid
+    (lambda (w prop value)
+      (declare (unused prop))
+      (when value
+	    (make-timer (lambda () (window-put w 'avoid t)) 1)
+	(when (window-get w 'avoid)
+	    (make-timer (lambda () (window-remprop w 'avoid)) 1)))))
+
   (define-match-window-setter 'new-workspace
     (lambda (w prop value)
       (declare (unused prop))

... as you can see I'm using a timer to delay it. That is because it's not working else,
but before committing, I wanted to ask you, whether there's a better way to achieve it.	

Regards,
Chris


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