diff -ur /var/tmp/portage/xcompmgr-1.1.1/work/xcompmgr-1.1.1/xcompmgr.c /home/lynx/Desktop/working/xcompmgr-1.1.1/xcompmgr.c --- /var/tmp/portage/xcompmgr-1.1.1/work/xcompmgr-1.1.1/xcompmgr.c 2004-10-16 16:48:07.000000000 -0600 +++ /home/lynx/Desktop/working/xcompmgr-1.1.1/xcompmgr.c 2005-01-26 20:59:01.000000000 -0700 @@ -322,6 +322,7 @@ int now = get_time_in_milliseconds(); fade *f, *next; int steps; + Bool need_dequeue; #if 0 printf ("run fades\n"); @@ -342,12 +343,13 @@ printf ("opacity now %g\n", f->cur); #endif w->opacity = f->cur * OPAQUE; + need_dequeue = False; if (f->step > 0) { if (f->cur >= f->finish) { w->opacity = f->finish*OPAQUE; - dequeue_fade (dpy, f); + need_dequeue = True; } } else @@ -355,7 +357,7 @@ if (f->cur <= f->finish) { w->opacity = f->finish*OPAQUE; - dequeue_fade (dpy, f); + need_dequeue = True; } } determine_mode (dpy, w); @@ -365,6 +367,9 @@ w->shadow = None; w->extents = win_extents(dpy, w); } + /* Must do this last as it might destroy f->w in callbacks */ + if (need_dequeue) + dequeue_fade (dpy, f); } fade_time = now + fade_delta; }