[Sawfish] Re: Patches for styletab and compton

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


On Fri, 12 Sep 2014 22:07:05 +0200
wrote fuchur <flohtransporter@xxxxxxxxx>:

>Two patches for sawfish.
>Lock recolor in styletab with timer until theme is loaded
>sawfish now start 70% - 80% faster if you use the styletab theme.
>Compton now starts with a delay from 3 seconds if you start or restart
>sawfish, this fix the "flashing". 
>Stop compton bevor you close sawfish.

Patch 02-styletab.patch apply after 01-styletab.patch.

Lock recolor complete if sawfish start. Recolor and reframe theme if
all defcustom are loaded. With this two patches the images not recolor
each time if a defcustom or custom-set-property loaded if sawfish start.


GPG Fingerprint: CA3B 8204 5B3E 6D48 6D53  C116 E5BC 70D5 B8D7 B2B0
diff -urNad sawfish.orgi/themes/StyleTab/theme.jl sawfish/themes/StyleTab/theme.jl
--- sawfish.orgi/themes/StyleTab/theme.jl
+++ sawfish/themes/StyleTab/theme.jl
@@ -788,17 +788,20 @@
 (define (get-recolor-bright bright color)
   (brighten-color color bright))
+(define start-lock nil)
 (define (do-recolor img color)
   (if (and (eq styletab-c:styles 'Flat)
            (not flat-buttons))
       (make-sized-image 1 1 color)
     (if (not (eq styletab-c:styles 'Flat))
-        (let ((recolorer
-               (make-image-recolorer color
-                                     #:zero-channel blue-channel
-                                     #:index-channel green-channel)))
-          (recolorer img)
-          img)
+        (if start-lock
+            img
+          (let ((recolorer
+                 (make-image-recolorer color
+                                       #:zero-channel blue-channel
+                                       #:index-channel green-channel)))
+            (recolorer img)
+            img))
 (define (do-make-get-image img)
@@ -2937,6 +2940,7 @@
            (make-frame w 'shaped-transient-frame current-title)))))
 (define (timer-theme-load)
+  (setq start-lock 't)
   ;; Lock recolor untill all defcustom loaded.                                                                                                             
@@ -2945,6 +2949,7 @@
   (require 'rep.io.timers)
   (setq recolor-lock
         (make-timer (lambda ()
+                      (setq start-lock nil)
                       (setq recolor-lock nil)
                     (quotient 1000 1000) (mod 1000 1000))))

Attachment: signature.asc
Description: PGP signature

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