Re: Found cause for sawfish-pager bug (no patch yet)



Christopher Roy Bratusek <zanghar freenet de> writes:

> On SawfishPager: There have been issues with several windows while
> running SawfishPager (bad closures), I didn't have the time to fix it
> (switching to the new flat did eat up most of my time…), but I've
> found the cause:

Here's a patch.  It actually fixes two bugs: the bad closure errors with
sticky windows, and another problem I discovered while testing where
sticky windows wouldn't show up on the right viewports if
pager-stickies-on-all-viewports is nil and
pager-stickies-on-all-workspaces is t.

diff --git a/pager.jl b/pager.jl
index ca4141b..47bc017 100644
--- a/pager.jl
+++ b/pager.jl
@@ -264,7 +264,12 @@
                                    '(0 0))))))
                           (if (and pager-stickies-on-all-workspaces
                                    (window-get w 'sticky))
-                              ws-list
+                              ;; List every workspace:
+                              (let ((limits (workspace-limits))
+                                    (l))
+                                (do ((i (cdr limits) (1- i)))
+                                    ((< i (car limits)) l)
+                                  (setq l (cons i l))))
                             (or (window-workspaces w)
                                 (list (- current-workspace
                                          (car ws-limits)))))))
@@ -300,8 +305,8 @@
                                ,@r)))
                       ((loop l1 i (1- j) r)))))
           (mapcar (lambda (ws)
-                    (let ((vp-x (nth 4 (car l1)))
-                          (vp-y (nth 5 (car l1))))
+                    (let ((vp-x (nth 4 ws))
+                          (vp-y (nth 5 ws)))
                       `(,(window-id w)
                         ,(+ (scale (+ x vp-x) 'x) (car ws))
                         ,(+ (scale (+ y vp-y)) (cadr ws))
-- 
Jeremy Hankins <nowan nowan org>


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