rem: gotError = False;
add: oldHandler = XSetErrorHandler(handleXError);
context: writeSelection(Display *dpy, Window requestor, Atom property, Atom type,	       WMData *data){    int format, bpi;    format = WMGetDataFormat(data);    if (format == 0)	format = 8;    bpi = format/8;    /* printf("write to %x: %s\n", requestor, XGetAtomName(dpy, property)); */    gotError = False;#ifndef __sgi    if (!XChangeProperty(dpy, requestor, property, type, format,                         PropModeReplace, WMDataBytes(data),                         WMGetDataLength(data)/bpi))        return False;#else    /* in sgi seems this seems to return void */    XChangeProperty(dpy, requestor, property, type, format,                    PropModeReplace, WMDataBytes(data),                    WMGetDataLength(data)/bpi);#endif    XFlush(dpy);    return !gotError;}