rem: if (dock->auto_collapse) { if (dock->auto_collapse_magic) { WMDeleteTimerHandler(dock->auto_collapse_magic); dock->auto_collapse_magic = NULL; } if (!dock->collapsed) { dock->auto_collapse_magic = WMAddTimerHandler(AUTO_COLLAPSE_DELAY, clipAutoCollapse, (void *)dock); }
add: if (dock->auto_expand_magic) { WMDeleteTimerHandler(dock->auto_expand_magic); dock->auto_expand_magic = NULL; } if (dock->auto_collapse && !dock->auto_collapse_magic) { dock->auto_collapse_magic = WMAddTimerHandler(AUTO_COLLAPSE_DELAY, clipAutoCollapse, (void *)dock);
context: clipLeave(WDock *dock){    XEvent event;    WObjDescriptor *desc = NULL;    if (!dock || dock->type!=WM_CLIP)	return;    if (XCheckTypedEvent(dpy, EnterNotify, &event)!=False) {        if (XFindContext(dpy, event.xcrossing.window, wWinContext,                         (XPointer *)&desc)!=XCNOENT            && desc && desc->parent_type==WCLASS_DOCK_ICON            && ((WAppIcon*)desc->parent)->dock            && ((WAppIcon*)desc->parent)->dock->type==WM_CLIP) {            /* We didn't left the Clip yet */            XPutBackEvent(dpy, &event);            return;        }        XPutBackEvent(dpy, &event);    } else {        /* We entered a withdrawn window, so we're still in Clip */        return;    }    if (dock->auto_raise_magic) {        WMDeleteTimerHandler(dock->auto_raise_magic);        dock->auto_raise_magic = NULL;    }    if (dock->auto_raise_lower) {        dock->auto_lower_magic = WMAddTimerHandler(AUTO_LOWER_DELAY,                                                   clipAutoLower,                                                   (void *)dock);    }    if (dock->auto_collapse) {        if (dock->auto_collapse_magic) {            WMDeleteTimerHandler(dock->auto_collapse_magic);            dock->auto_collapse_magic = NULL;        }        if (!dock->collapsed) {            dock->auto_collapse_magic = WMAddTimerHandler(AUTO_COLLAPSE_DELAY,                                                          clipAutoCollapse,                                                          (void *)dock);        }    }}