- res = XGetWindowProperty(xw.dis, xw.win, XA_PRIMARY, 0, 0, False,
- AnyPropertyType, &type, &format, &nitems, &length, &data);
- switch(res) {
- case BadAtom:
- case BadValue:
- case BadWindow:
- fprintf(stderr, "Invalid paste, XGetWindowProperty0");
+ ofs = 0;
+ do {
+ if(XGetWindowProperty(xw.dis, xw.win, XA_PRIMARY, ofs, BUFSIZ/4,
+ False, AnyPropertyType, &type, &format,
+ &nitems, &rem, &data)) {
+ fprintf(stderr, "Clipboard allocation failed\n");