Possible clipboard hang fix in the works
Harold L Hunt II
huntharo@msu.edu
Wed Mar 24 07:49:00 GMT 2004
I was just talking to 'jst' in irc.freenode.net about the periodic
hanging caused by the clipboard integration manager.
I took a peek at the source code again (it is tough to understand and
tough to not cause infinite loops, that's why I look at it about once
every 3 months) and realized that I left in something that never realy
intended to leave in: a blocking call that waits for an X application to
send clipboard data.
The part I am referring to is that we call XPeekIfEvent to wait for a
SelectionNotify event to be sent back to our clipboard manager. If an X
application is misbehaved or if something goes wrong, then that message
will never come. The problem with XPeekIfEvent is that it does not
allow for a timeout value to be specified, so it blocks forever if the
event never comes.
Upon a cursory inspection it should be almost trivial to replace the
call to XPeekIfEvent with a simple loop that does the same thing but has
a timeout value that prevents it from blocking indefinitely.
Course... that means we probably can't use select... so I'll have to
look at how XPeekIfEvent works and write something similar to it.
In any case, I might have a fix for this problem later this week or as
early as Wednesday.
Harold
More information about the Cygwin-xfree
mailing list