--- old/xcompmgr-1.1.3/xcompmgr.c 2005-10-06 17:08:02.000000000 -0700 +++ xcompmgr-1.1.3/xcompmgr.c 2007-01-25 11:55:35.000000000 -0800 @@ -1165,6 +1165,9 @@ w->damaged = 1; } +static unsigned int +get_opacity_prop (Display *dpy, win *w, unsigned int def); + static void map_win (Display *dpy, Window id, unsigned long sequence, Bool fade) { @@ -1179,6 +1182,10 @@ /* This needs to be here or else we lose transparency messages */ XSelectInput (dpy, id, PropertyChangeMask); + /* This needs to be here since we don't get PropertyNotify when unmapped */ + w->opacity = get_opacity_prop (dpy, w, OPAQUE); + determine_mode (dpy, w); + #if CAN_DO_USABLE w->damage_bounds.x = w->damage_bounds.y = 0; w->damage_bounds.width = w->damage_bounds.height = 0; @@ -1467,10 +1474,7 @@ new->borderClip = None; new->prev_trans = 0; - /* moved mode setting to one place */ - new->opacity = get_opacity_prop (dpy, new, OPAQUE); new->windowType = determine_wintype (dpy, new->id); - determine_mode (dpy, new); new->next = *p; *p = new;