Re: Re: Add compton module to sawfish

fuchur <[email protected]>
Newsgroups gmane.comp.window-managers.sawfish
Organization W.W
Message-ID <[email protected]>
Hi,

On Mon, 16 Sep 2013 17:09:05 +0200
wrote Christopher Roy Bratusek <[email protected]>:

>> Or your can also test this patch. I have add a check for
>> "--xinerama-shadow-crop" and you must not restart sawfish if you have a
>> version without "--xinerama-shadow-crop".
>
>I commited this one. changes:
>
>- fixed spelling in tabgroup.jl
>- only apply --xinerama-shadow-crop with choosen by defcustom and if 
>choosen by user (saving one if-clause)
>
>For me, with xinerama-stuff disabled, the screen only flashes once (that is 
>expected, as this means compton successfully started), not five times.
>
>Regards,
>Chris

Here i have many flashes with --xinerama-shadow-crop enable and also
many xinerama-shadow-crop entries in ~/.xsession-errors. I remove
xinerama-shadow-crop with this patch, and add window-maximized-*
and we have the same affect as with xinerama-shadow-crop.

-- 
Regards,
Fuchur

GPG Fingerprint: CA3B 8204 5B3E 6D48 6D53  C116 E5BC 70D5 B8D7 B2B0
01_xinerama.patch (text/x-patch, 3.2 KB)
diff -urNad sawfish.orig/lisp/sawfish/wm/prg/compton.jl sawfish/lisp/sawfish/wm/prg/compton.jl
--- sawfish.orig/lisp/sawfish/wm/prg/compton.jl
+++ sawfish/lisp/sawfish/wm/prg/compton.jl
@@ -30,6 +30,7 @@
           sawfish.wm.misc
           sawfish.wm.custom
           sawfish.wm.windows
+          sawfish.wm.state.maximize
           sawfish.wm.ext.match-window)
 
   (define-structure-alias compton sawfish.wm.prg.compton)
@@ -89,7 +90,7 @@
       :type boolean
       :after-set (lambda () (switch-opacity)))
 
-    (defcustom shadows-crop-xinerama nil "Crop shadows in xinerama setups (not supported by all compton versions)."
+    (defcustom shadows-crop-maximized nil "Crop shadows by maximized Windows (xinerama support):"
       :depends opacity-enable
       :group (appearance window-effects)
       :type boolean
@@ -253,9 +254,6 @@
     (define (zero) (if zero-mask '-z '-e1))
     (define (dad) (if shadows-disable-dad '-G '-e1))
     (define (smenu) (if shadows-disable-menu (concat "window_type *= 'menu'") (concat "window_type *= 'nil'")))
-    (define (sxinerama)
-      (if (and (eq (system  "compton --help |grep xinerama-shadow-crop") '0)
-               shadows-crop-xinerama) '--xinerama-shadow-crop '-e1 ))
 
     (define (trans) (/ (+ 0.00 translucency) 100))
     (define (fade-i) (/ (+ 0.00 fade-in) 1000))
@@ -278,8 +276,7 @@
                            (c-menu-o (menu-o))
                            (c-red (red))
                            (c-green (green))
-                           (c-blue (blue))
-                           (c-sxinerama (sxinerama)))
+                           (c-blue (blue)))
       "Start compton. If a compton process already exists, it's beeing killed."
       (when (program-exists-p "compton")
         (stop-compton)
@@ -288,8 +285,8 @@
                        "-r" (number->string blur-radius) "-o" (format nil "%s" c-trans) "-l" (number->string left-offset)
                        "-t" (number->string top-offset) "-I" (format nil "%s" c-fade-i) "-O" (format nil "%s" c-fade-o) "-D" (number->string fade-time)
                        "-m" (format nil "%s" c-menu-o) "--shadow-red" (format nil "%s" c-red) "--shadow-green" (format nil "%s" c-green)
-                       "--shadow-blue" (format nil "%s" c-blue) (format nil "%s" c-dad) (format nil "%s" c-sxinerama) "--detect-rounded-corners"
-                       "--shadow-exclude" (concat c-smenu) "--shadow-exclude" "_COMPTON_SHADOW:32c = 0")))
+                       "--shadow-blue" (format nil "%s" c-blue) (format nil "%s" c-dad) "--detect-rounded-corners" "--shadow-exclude" (concat c-smenu) 
+                       "--shadow-exclude" "_COMPTON_SHADOW:32c = 0")))
 
     (define (stop-compton)
       "Stop compton, if running."
@@ -314,6 +311,9 @@
                    shadows-disable-shaped)
               (and (not shadows-enable))
               (window-get w 'no-shadows)
+              (and shadows-crop-maximized
+                   (window-maximized-vertically-p w)
+                   (window-maximized-horizontally-p w))
               (and (if shadows-main-win
                        (and (not (eq (get-type w) '_NET_WM_WINDOW_TYPE_DIALOG))
                             (not (eq (get-type w) '_NET_WM_WINDOW_TYPE_NORMAL))))))
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iEYEARECAAYFAlI4FGAACgkQ5bxw1bjXsrB9pwCeLw0P1oj2MTl3yL6fCrstWkIS
6/EAniXpIyDMShXy9Zf4CfEgBWjqJ6JA
=hUgi
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.