disable fading opacity changes

This commit is contained in:
Christopher Jeffrey 2011-12-09 08:46:40 -06:00
parent 48e0eccbbc
commit 1e2bb55744
3 changed files with 16 additions and 13 deletions

View File

@ -24,6 +24,6 @@ uninstall:
@rm -f $(MANDIR)/compton.1
clean:
rm -f $(OBJS) compton
@rm -f $(OBJS) compton
.PHONY: uninstall clean

View File

@ -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
```

View File

@ -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);
}
}