[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] [BUG] pygame.scrap crashes on X.Org



Thanks Marcus.

there seems to be a problem with the changes on my Debian machine.

I used the examples/scrap_clipboard.py to test it.  With that example
the g key gets from the clipboard, and the p key puts to the
clipboard.

I select some text in a different window.  Then go back to the
scrap_clipboard.py window and press g.  I need to press g twice before
the correct text is given back.

If I try the same thing and paste into other windows it pastes correctly.

Cheers,

On 7/26/06, Marcus von Appen <mva@xxxxxxxxxxxx> wrote:
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