rem: WMDraggingInfo *info = &scr->dragInfo;
context: getTypesFromTypeList(WMScreen *scr, Window sourceWin){    WMDraggingInfo *info = &scr->dragInfo;    Atom dataType;    Atom* typeAtomList;    WMArray* typeList;    int i, format;    unsigned long count, remaining;    unsigned char *data = NULL;    XGetWindowProperty(scr->display, sourceWin, scr->xdndTypeListAtom,                       0, 0x8000000L, False, XA_ATOM, &dataType, &format,                       &count, &remaining, &data);    if (dataType!=XA_ATOM || format!=XDND_PROPERTY_FORMAT || count==0 || !data) {        if (data) {            XFree(data);        }        return createSourceTypeArray(0);    }    typeList = createSourceTypeArray(count);    typeAtomList = (Atom*) data;    for (i=0; i < count; i++) {        WMAddToArray(typeList, XGetAtomName(scr->display, typeAtomList[i]));    }    XFree(data);    return typeList;}