Don't generate a mask if there's a pending configure event for the window since it's likely that the shadow will be very quickly discarded. (I find that this speeds up resizing somewhat: shadow generation no longer lags behind.) Signed-Off-By: Darren Salt Index: src/compositor.c =================================================================== --- src/compositor.c (revision 22242) +++ src/compositor.c (working copy) @@ -819,6 +819,7 @@ DisplayInfo *display_info; ScreenInfo *screen_info; XRectangle r; + XEvent ev; g_return_val_if_fail (cw != NULL, None); TRACE ("entering win_extents: 0x%lx", cw->id); @@ -836,7 +837,8 @@ - It's a window with a frame and the user asked for shadows under regular windows, - it's an override redirect window that is not shaped, not an argb and - the user asked for shadows on so called "popup" windows. + the user asked for shadows on so called "popup" windows + - there isn't a pending configure event for this window. */ if (!(screen_info->overlays) && @@ -845,7 +847,8 @@ screen_info->params->show_popup_shadow) || (!WIN_IS_OVERRIDE(cw) && (WIN_HAS_FRAME(cw) || !(WIN_IS_ARGB(cw) || WIN_IS_SHAPED(cw))) && - screen_info->params->show_frame_shadow))) + screen_info->params->show_frame_shadow)) && + !XCheckWindowEvent (display_info->dpy, cw->id, StructureNotifyMask, &ev)) { XRectangle sr;