[Sawfish] The branches makes me crazy

[ Thread Index | Date Index | More lists.tuxfamily.org/sawfish Archives ]


Hi,

The branch mix is crazy (for me). If i build Styletab i should use
theming-1.9 and sawfish-config-1.9 and also sometimes misc-1.9. In a
other tread you mail:

-- >On Sat, 08 Oct 2011 22:46:45 +0200
>wrote Christopher Roy Bratusek <nano@xxxxxxxxxxxxx>:
>
>>... you can instead checkout the local-master branch, which is a combination 
>>of the branches master, edge-actions-1.9, sawfish-config-1.9 and theming-1.9, 
>>or in other words: it's the full Sawfish 1.9. 
>
>Ok, i will switch to local-master branch.
>

Now if i make changes in tabgroup.jl it goes in the misc-1.9 branch,
but misc-1.9 use old tabthemes. Also not all patches for tabs
are in misc-1.9 (e.g adjust-title is remove a long time ago) but
updated tabthemes need the patches for tabs.

So we have misc-1.9 theming-1.9 sawfish-config-1.9 and local-master
branches and some/all have different/updated tab themes but not all
patches for tabs.

If i run a diff for example from tabgroup.jl in misc-1.9 to my
tabgroup.jl i got:

--- /tmp/stuff/misc-1.9/tabgroup.jl
+++ /usr/share/sawfish/lisp/tabgroup.jl
@@ -21,7 +21,6 @@
 (define-structure sawfish.wm.tabs.tabgroup
 
     (export window-tabbed-p
-            adjust-title
             tab-refresh-group
             tab-release-window
             tab-raise-left-window
@@ -70,9 +69,6 @@
     (d tab-group-dimensions)
     (wl tab-group-window-list))
 
-  (define (adjust-title w)
-    (call-window-hook 'window-state-change-hook w (list
'(title-position)))) -
   (define (tab-move-resize-frame-window-to win x y w h)
     "Move and resize according to *frame* dimensions."
     (let* ((dim1 (window-dimensions win))
@@ -146,7 +142,7 @@
       (tab-delete-window-from-group w (tab-window-group-index w))
       (window-put w 'fixed-position nil)
       (tab-refresh-group oldgroup 'frame)
-      (rebuild-frame w 'frame)))
+      (reframe-window w)))
 
   (define (tab-put-window-in-group win index)
     "Put window in group at given index."
@@ -168,7 +164,6 @@
                  (wins (tab-group-window-list (nth index tab-groups)))
                  (focus (tab-group-offset win 0))
                  (unfocus (remove focus wins)))
-            (adjust-title win)
             (cond
              ((eq prop 'raise)
               (raise-windows focus wins))
@@ -179,8 +174,8 @@
                (window-put focus 'title-position
group-title-position))) ((eq prop 'frame)
               (mapcar (lambda (w)
-                        (rebuild-frame w)) unfocus)
-              (rebuild-frame focus))
+                        (reframe-window w)) unfocus)
+              (reframe-window focus))
              ((eq prop 'reframe)
               (mapcar (lambda (w)
                         (reframe-window w)) unfocus))
@@ -383,7 +378,7 @@
                (tabs (remove win (tab-group-window-list (nth index
tab-groups)))) (default-window-animator 'none))
           (tab-delete-window-from-group win index)
-          (rebuild-frame win)
+          (reframe-window win)
           (setq tab-refresh-lock nil)
           (mapcar (lambda (w)
                     (when (window-get w 'never-iconify)
@@ -431,12 +426,18 @@
   (define (in-tab-group win)
     "Add a new window as tab if have one (the first created if more as
one) of the windows the same 'tab-group property"
-    (when (window-get win 'tab-group)
-      (setq in-tab-group-name (append in-tab-group-name (cons (cons
(window-id win) (window-get win 'tab-group)))))
-      (let ((open-win-tabgroup (get-window-by-id (car (rassoc
(window-get win 'tab-group) in-tab-group-name)))))
-        (if (and open-win-tabgroup
-                 (not (eq win open-win-tabgroup)))
-            (tab-group-window win open-win-tabgroup)))))
+     (when (window-get win 'tab-group)
+       (setq in-tab-group-name (append in-tab-group-name (cons (cons
(window-id win) (window-get win 'tab-group)))))
+       (let ((open-win-tabgroup (get-window-by-id (car (rassoc
(window-get win 'tab-group) in-tab-group-name)))))
+        ;; unmap-notify-hook gets not always a window-id for all 
+        ;; windows e.g. gimp (it will close more as one window and
+        ;; also not all call the unmap-notify-hook and/or we get the
window-id).
+        ;; This next "if" will clean the list and remove the "ghosts".
+        (if (not (eq open-win-tabgroup nil))
+            (if (not (eq win open-win-tabgroup))
+                (tab-group-window win open-win-tabgroup))
+          (setq in-tab-group-name (remove (rassoc (window-get win
'tab-group) in-tab-group-name) in-tab-group-name))
+          (in-tab-group win)))))
 
   (define (remove-from-tab-group win)
     "Remove window from in-tab-group-name alist if it have a
     'tab-group property"



Regards,
Fuchur

GPG Fingerprint: CA3B 8204 5B3E 6D48 6D53  C116 E5BC 70D5 B8D7 B2B0

Attachment: signature.asc
Description: PGP signature



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/