From 1e2bb55744cc11b0893ed9813fe1741ba95bce5c Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Fri, 9 Dec 2011 08:46:40 -0600 Subject: [PATCH] disable fading opacity changes --- Makefile | 2 +- README.md | 1 + compton.c | 26 ++++++++++++++------------ 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 0b10e0b..cca46e0 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,6 @@ uninstall: @rm -f $(MANDIR)/compton.1 clean: - rm -f $(OBJS) compton + @rm -f $(OBJS) compton .PHONY: uninstall clean diff --git a/README.md b/README.md index c487b04..cb67951 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ $ make install ``` bash $ compton -cC -i 0.6 -e 0.6 +$ compton -cC -i 0.6 -e 0.6 -fF $ compton -cC -fF -I 0.065 -O 0.065 -D 6 -m 0.8 -i 0.6 -e 0.6 ``` diff --git a/compton.c b/compton.c index 8beb91d..0dbebae 100644 --- a/compton.c +++ b/compton.c @@ -1628,26 +1628,28 @@ determine_mode(Display *dpy, win *w) { static void set_opacity(Display *dpy, win *w, unsigned long opacity) { +#if 0 if (fade_trans) { double old_opacity = (double)w->opacity / OPAQUE; w->opacity = opacity; set_fade(dpy, w, old_opacity, (double)w->opacity / OPAQUE, fade_out_step, 0, True, False); - } else { - w->opacity = opacity; - determine_mode(dpy, w); - if (w->shadow) { - XRenderFreePicture(dpy, w->shadow); - w->shadow = None; + return; + } +#endif + w->opacity = opacity; + determine_mode(dpy, w); + if (w->shadow) { + XRenderFreePicture(dpy, w->shadow); + w->shadow = None; - if (w->extents != None) { - XFixesDestroyRegion(dpy, w->extents); - } - - /* rebuild the shadow */ - w->extents = win_extents(dpy, w); + if (w->extents != None) { + XFixesDestroyRegion(dpy, w->extents); } + + /* rebuild the shadow */ + w->extents = win_extents(dpy, w); } }