I found an error on the previous patch, the clipboard thread was restarting on every X clipboard error. I changed this by adding a test on the request_code error to restart the thread only if the request_code equals to 24 which is the error code for a BadWindow. It seems to me that this is better like this. This new version of the patch is named V2, Sorry for the trouble. Regards, Michel Hummel 2010/9/24 Michel Hummel > > Hi Jon, > You will find attached to this Email a patch (for the git version) > which implements for the clipboard thread : >  - Auto cleanup function >  - Auto restart function for unexpected exit of the clipboard or > Xerror detection >  - Deletion of XQuery wrapper  (not needed anymore) >  - Deletion of all the xdmcp related tricks  (not needed anymore) > > One thing, this patch deletes the call to EmptyClipboard () in the > winProcSetSelectionOwner function of the winclipboardwrappers.c file > when an "owned to not owned transition" has been detected. I don't > know why but it was freezing the server for 1 or 2 seconds during > clipboard's restart in xdmcp connection. > > It would be fine if you could tell me, when you think this patch and > the previous one ( which makes the reset of the server working > correctly with clipboard) will be included to the official X server? > > Regards, > Michel Hummel > > > 2010/9/22 Jon TURNEY > > > > On 22/09/2010 10:03, Michel Hummel wrote: > >> > >> Hello, > >> I've modified my patch, to change the restart process. > >> It does not use anymore the winProcEstablishConnection wrapper to > >> restart the clipboard but directly the winInitClipboard function. > >> > >> This allows to restart the clipboard more quickly and if the clipboard > >> thread cannot connects to the server (there is a loop on connection > >> with a delai between retries), it will die. > >> > >> One question : > >> I have written my patch for the git version of the X server and the > >> patch is not working as it on the 1.8.0-1 version. > >> Which version would you like,  perhaps the two ? > > > > A patch against current git master is fine, although I don't think there have been significant changes in this area recently, so why it doesn't work for 1.8.0-1 as well is mysterious. > > > > -- > > Jon TURNEY > > Volunteer Cygwin/X X Server maintainer