Re: [Sawfish] Patch to save memory and speed up StyleTab

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


Hi,

On Tue, 19 Aug 2014 22:20:17 +0200
wrote Christopher Roy Bratusek <nano@xxxxxxxxxxxxx>:

>Hi,
>
>long no see...
>
>Applied patches 04 'til 13, looks fine. I only did minor changes (more 
>excluded wm_class for cabinet, cabinet-missing from oxygen-icons + 
>sawfishimagedir in Makedefs). Though I added frame-style-tabbars to 
>Elberg-tabbed and gradient-tabbed aswell, seems you've left them out.
>
>@all: please test the changes commited today, they affect tiling + 
>tabbing (in combination) and cabinet. I want to roll-out 1.11 sometime 
>from 20th September to 5th Octocber - so tests will be appreciated.
>
>Regards,
>Chris

Patch to enable input-line in cabinet.

-- 
Regards,
Fuchur

GPG Fingerprint: CA3B 8204 5B3E 6D48 6D53  C116 E5BC 70D5 B8D7 B2B0
diff -urNad /usr/share/sawfish.orgi-1/lisp/sawfish/wm/ext/cabinet.jl /usr/share/sawfish/lisp/sawfish/wm/ext/cabinet.jl
--- /usr/share/sawfish.orgi-1/lisp/sawfish/wm/ext/cabinet.jl
+++ /usr/share/sawfish/lisp/sawfish/wm/ext/cabinet.jl
@@ -704,7 +704,7 @@
            (setq workspace-mode (not workspace-mode))
          (setq workspace-mode t)
          (update-on-workspace)))))
-  
+
   (define (with-update-on-workspace cmd)
     "It filters items for current workspace windows.
 add it, when your command changed workspace"
@@ -721,7 +721,18 @@
                       (or (memq current-workspace ww)
                           (eq ww nil)))) 
                   wlist-for-manipulation)))
-  
+
+  (define (update-on-bs cmd)
+    "Update cabinets interface after backspce"
+    (lambda ()
+      (cmd)
+      (if workspace-mode
+          (update-on-workspace)
+        (setq wlist-for-manipulation
+              (filter cabinet-filter-for-manipulation-func
+                      (filter cabinet-filter-for-display-func
+                              (stacking-order)))))))
+
   (define (call-marked cmd)
     "Call marked hook if window marked"
     (call-window-hook 'window-state-change-hook cmd (list '(marked))))
@@ -860,7 +871,7 @@
                                (concat cabinet-input " ")))))
                "BS" (with-draw
                      (with-update-on-input
-                      (with-update-on-workspace
+                      (update-on-bs
                        (with-new-wlist
                         (lambda ()
                           (when (> (length cabinet-input) 0)
diff -urNad /usr/share/sawfish.orgi-1/lisp/sawfish/wm/util/events.jl /usr/share/sawfish/lisp/sawfish/wm/util/events.jl
--- /usr/share/sawfish.orgi-1/lisp/sawfish/wm/util/events.jl
+++ /usr/share/sawfish/lisp/sawfish/wm/util/events.jl
@@ -22,7 +22,7 @@
 
     (export event-wait-for
             event-exit-wait)
-
+    
     (open rep
           rep.data
           rep.system
@@ -56,18 +56,11 @@
                         (throw 're-exit
                                (event-name (current-event)))))
              (key nil))
-         ;; XXX No idea what this hook do, here i only got
-         ;; XXX a error messages if i click on an frame part:
-         ;; XXX
-         ;; XXX Sawfish error: 
-         ;; XXX No catcher for throw: re-exit
-         ;; XXX
-         ;; XXX Disable this hook untill someone fix this.
-         ;;(add-hook 'unbound-key-hook re-exit)
+         (add-hook 'unbound-key-hook re-exit)
          (while (catch 'event-exit
                   (setq key
                         (catch 're-exit
-                          (recursive-edit)))
+                              (recursive-edit)))
                   (when handler
                      (do ((l handler (cdr handler)))
                         ((null l) t)
@@ -82,7 +75,8 @@
                   t)
            t)
          (when exit-hook
-           (exit-hook key))))))
+           (exit-hook key))
+         (remove-hook 'unbound-key-hook re-exit)))))
 
   (define (event-exit-wait)
     "You'll find it useful,when you're using `event-wait-for'"

Attachment: signature.asc
Description: PGP signature



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