Re: [Sawfish] Re: Add compton module to sawfish |
[ Thread Index | Date Index | More lists.tuxfamily.org/sawfish Archives ]
Hi, On Sun, 15 Sep 2013 22:52:40 +0200 wrote fuchur <flohtransporter@xxxxxxxxx>: >Hi, > >On Sun, 15 Sep 2013 21:09:36 +0200 >wrote fuchur <flohtransporter@xxxxxxxxx>: > >>Hi, >> >>On Sat, 14 Sep 2013 20:09:12 +0200 >>wrote Christopher Roy Bratusek <nano@xxxxxxxxxxxxx>: >> >>>I corrected two more typos, and I found the issue why it does not work for me: >>> >>> --xinerama-shadow-crop does not exist on debian (both official and self-compiled from >>>git repository) So I added a new boolean defcustom: shadows-crop-xinerama, defaulted >>>to nil with note that not all compton versions support it. >> >>Your changes --xinerama-shadow-crop also crash compton. You have use >>"--xinerama-shadow-crop" but it should '--xinerama-shadow-crop. >> >>By this patch: >>Add a hook "tab-group-windows-hook" to tabgroup.jl. This hook >>returns the tabbed windows in a group if a tab add or remove from a >>tabgroup. >> >>Improve tabsupport in compton.jl. >> >>Fix --xinerama-shadow-crop crash. >> >> >>Patch also tested in debian. >> > >I'm sorry, but patch 01_compton-xinerama-fix.patch is broken. >I should not edit patches with a text editor ... > >Use this one (02_compton-xinerama-fix.patch). Also tested witch >an empty ~/.sawfish folder :). > > 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". -- Regards, Fuchur GPG Fingerprint: CA3B 8204 5B3E 6D48 6D53 C116 E5BC 70D5 B8D7 B2B0
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 @@ -38,6 +38,7 @@ (define switch-opacity nil) (define update-opacity nil) (define stop-compton nil) + (defgroup window-effects "Window Effects" :group appearance) @@ -252,7 +253,11 @@ (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 shadows-crop-xinerama "--xinerama-shadow-crop" '-e1 )) + ;;(define (sxinerama) (if shadows-crop-xinerama '--xinerama-shadow-crop '-e1)) + (define (sxinerama) + (if (eq (system "compton --help |grep xinerama-shadow-crop") '0) + (if shadows-crop-xinerama '--xinerama-shadow-crop '-e1 ) + '-e1)) (define (trans) (/ (+ 0.00 translucency) 100)) (define (fade-i) (/ (+ 0.00 fade-in) 1000)) @@ -276,7 +281,7 @@ (c-red (red)) (c-green (green)) (c-blue (blue)) - (c-sxinerama (sxinerama))) + (c-sxinerama (sxinerama))) "Start compton. If a compton process already exists, it's beeing killed." (when (program-exists-p "compton") (stop-compton) @@ -398,13 +403,13 @@ (dim-window w (get-opacity opacity-by-resize))) (define (tab-release w) - (if (eq w 'tab-release-window) - (map-windows (lambda (win) - (if opacity-enable - (window-opacity win) - (dim-window win (get-opacity '100))))))) + (if (and (car w) + (not (cdr w))) + (if opacity-enable + (window-opacity (car w)) + (dim-window (car w) (get-opacity '100))))) - (add-hook 'post-command-hook (lambda (w) (if opacity-enable (tab-release w)))) + (add-hook 'tab-group-windows-hook (lambda (w) (if opacity-enable (tab-release w)))) (add-hook 'after-add-window-hook (lambda (w) (if opacity-enable (window-opacity w)))) (add-hook 'shade-window-hook (lambda (w) (if opacity-enable (window-opacity w)))) (add-hook 'focus-in-hook (lambda (w) (if opacity-enable (window-opacity w)))) diff -urNad sawfish.orig/lisp/sawfish/wm/tabs/tabgroup.jl sawfish/lisp/sawfish/wm/tabs/tabgroup.jl --- sawfish.orig/lisp/sawfish/wm/tabs/tabgroup.jl +++ sawfish/lisp/sawfish/wm/tabs/tabgroup.jl @@ -62,6 +62,10 @@ (define in-tab-group-name nil) (define tab-theme-name) + (defvar tab-group-windows-hook '() + "Tab-group-windows-hook called by change or created a tabgroup. +Containing all windows current in the tabgroup") + (define (set-tab-theme-name #!key frame-style-supported-tabs) (setq tab-theme-name frame-style-supported-tabs)) @@ -155,10 +159,12 @@ (remove-from-tab-group w)) (setq release-window t) (when (window-tabbed-p w) - (tab-delete-window-from-group w (tab-window-group-index w)) - (window-put w 'fixed-position nil) - (tab-refresh-group oldgroup 'frame) - (reframe-window w))) + (let ((wins (list (remove w (tab-group-window-index w))))) + (tab-delete-window-from-group w (tab-window-group-index w)) + (window-put w 'fixed-position nil) + (tab-refresh-group oldgroup 'frame) + (call-hook 'tab-group-windows-hook wins) + (reframe-window w)))) (define (tab-put-window-in-group win index) "Put window in group at given index." @@ -353,6 +359,7 @@ (setq tab-refresh-lock t) (tab-refresh-group w 'frame) (set-input-focus w) + (call-hook 'tab-group-windows-hook (list (tab-group-window-index w))) (if (not (window-tabbed-p win)) (window-put win 'tabbed t)) (window-put w 'tabbed t))))) @@ -441,6 +448,7 @@ (window-put w 'never-iconify-opaque nil) (window-put w 'never-iconify t)) (window-put w 'tabbed t)) wins) + (call-hook 'tab-group-windows-hook (list (tab-group-window-index win))) (raise-window win) (setq all-wins nil)) (setq tab-refresh-lock t)
Attachment:
signature.asc
Description: PGP signature
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |