[BUG][FIX][UNIX][VM] Finally got X clipboard working with Qt/KDE

Ned Konz ned at bike-nomad.com
Fri Sep 7 22:52:15 UTC 2001


There is a bug in the Unix sqXWindow.c code that doesn't properly refuse 
anything but XA_STRING clipboard target requests. As a result, Qt programs 
(including all of KDE), which ask for TARGETS (wanting to know about what 
types are supported) get a string response they can't handle, but with the 
type they requested.

There is a comment in the source that actually acknowledges this problem 
("this should REFUSE the selection if the target type isn't XA_STRING") but 
nothing was done. So I fixed it.

The attached patch fixes this problem by refusing clipboard requests that 
aren't asking for XA_STRING.

It also uses a real timestamp for the XSetSelectionOwner rather than 
CurrentTime, since the ICCCM manual says that we shouldn't do that. I don't 
know how much difference that makes.

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clipboard.patch
Type: text/x-diff
Size: 2332 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20010907/6547f758/clipboard.bin


More information about the Squeak-dev mailing list