Hi,
the pygame.scrap module has several issues, which prevent it from being
usable. The following list applies to X.Org 6.9 (tested on FreeBSD
RELENG_6 only). The mentioned bugs are fixed in the attached patch.
* No SDL checks. The pygame modules usually throw an error on missing
initialization. scrap does not, but crashes upon using its methods
directly (all platforms (?)).
* Xlib throws XConvertSelection errors upon trying to receive the
XA_PRIMARY selection, if a different window is selected. This is
fixed by checking for any possible selection buffer in XA_PRIMARY,
XA_SECONDARY, XA_CUT_BUFFER0 and using the returned owner
window. (X.Org only.)
* Dead lock upon receiving a correct selection buffer. The
SelectionNotify event does not seem to be passed to the pygame window,
which could cause it to end up in an endless loop. (X.Org only.)
Fixed by removing the response loop.
Please recheck and test the patch before commiting.
Regards
Marcus