This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: Possible clipboard hang fix in the works
- From: Harold L Hunt II <huntharo at msu dot edu>
- To: cygwin-xfree at cygwin dot com
- Date: Wed, 24 Mar 2004 09:17:38 -0500
- Subject: Re: Possible clipboard hang fix in the works
- References: <40612474.2000808@msu.edu> <20040324061753.GA12852@redhat.com>
- Reply-to: cygwin-xfree at cygwin dot com
Christopher Faylor wrote:
On Wed, Mar 24, 2004 at 01:02:28AM -0500, Harold L Hunt II wrote:
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.
Why can't you use select()? select() takes a timeout value.
Because I won't actually be reading the pending events and processing
them... so once I get woken up once I'll have one of two problems:
1) I'll continue to get woken for the same event.
2) I won't get woken for the same event (assuming it is the
SelectionNotify event) when I call my function that processes all
pending X events by calling select() in a loop.
I should explain that in #1 we don't know (and can't expect) that the
first event will be the SelectionNotify event. It will more often be
the case that there are some events between when we first start waiting
and when the SelectionNotify arrives.
Harold