test case for clipboard hang?
Tue Mar 30 14:59:00 GMT 2004
Well, I've kicked the -63 server around a fair bit this weekend and it
seems to be holding up very well. No crashes, and generally no unpleasant
surprises. I have still managed to activate the "2 second timeout" code,
though, by doing some pathological things, that are probably impossible to
work around due to the incompatibilities between the X and Windows
conceptions of the clipboard.
Harold: In winClipboardFlushXEvents, I think the line:
iReturn = XChangeProperty (pDisplay,
(char *) atomTargetArr,
should have 32 instead of 8.
Also, re the following, changelog, can you tell me where to find the
changes. I see no calls to XSync or select at
and I'd like to see the code that does this.
Released: 2004-03-25 0055 EST
Download source: Now available as src package via setup.exe
winclipboardwndproc.c, winclipboardxevents.c - Attempt to fix clipboard
deadlock that was causing hangs. The nature of the fix was to stop calling
XPeekIfEvent since it will block until the specified type of event is
seen. Instead, we call XSync to flush output events and wait for them to
be processed, then we do our own little loop with a call to select() using
a timeout of 3 seconds from when we started (the timeout is adjusted after
each call to select()). This should alleviate problems with XPeekIfEvent
not returning. Finally, since we can detect whether the SelectionNotify
event has arrived now, I added code to paste NULL to the Win32 clipboard
if the X11 application never returns any useful clipboard data; this
should prevent Win32 applications from freezing when there are problems
pasting from X11 to Win32. (Harold L Hunt II - CodeWeavers)
More information about the Cygwin-xfree