rem: printf("got text [%s]\n", text);
context: requestHandler(WMView *view, Atom selection, Atom target, void *cdata,    Atom *type){    Text *tPtr = view->self;    Display *dpy = tPtr->view->screen->display;    Atom _TARGETS;     Atom TEXT = XInternAtom(dpy, "TEXT", False);    Atom COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False);    WMData *data = NULL;    if (target == XA_STRING || target == TEXT || target == COMPOUND_TEXT) {        char *text = WMGetTextSelectedStream(tPtr);            if (text) {printf("got text [%s]\n", text);            data = WMCreateDataWithBytes(text, strlen(text));               WMSetDataFormat(data, TYPETEXT);        }        *type = target;        return data;    }   else printf("didn't get it\n");    _TARGETS = XInternAtom(dpy, "TARGETS", False);    if (target == _TARGETS) {        Atom *ptr;                ptr = wmalloc(4 * sizeof(Atom));        ptr[0] = _TARGETS;        ptr[1] = XA_STRING;        ptr[2] = TEXT;        ptr[3] = COMPOUND_TEXT;                data = WMCreateDataWithBytes(ptr, 4*4);        WMSetDataFormat(data, 32);            *type = target;        return data;    }           return NULL;}        