xwinclip-Test06
Harold L Hunt II
huntharo@msu.edu
Mon Dec 30 05:11:00 GMT 2002
Benny,
Yes, you are correct that NULL should be passed to PeekMessage rather
than the handle to the messaging window. I have made this change now.
However, I will leave in the messaging window as it is needed by many
people that are working on patches, so it would be silly to remove all
of that framework.
I will try to make a new release of xwinclip shortly.
Harold
Benjamin Riefenstahl wrote:
> Hi all, Harold,
>
>
> I just figured out a problem that I have had with xwinclip-Test06.
>
> The Windows PeekMessage() message loop doesn't process all messages.
> When a message gets sent that is not processed, xwinclip starts an
> endless loop alternating between select() and PeekMessage().
>
> The reason is the way PeekMessage() is called with a HWND as
> parameter. That filters messages, so only messages to that special
> HWND are returned and processed. Messages with a NULL HWND (like
> WM_QUIT or other, possibly Windows-internal messages) remain in the
> queue.
>
> I just commented out the creation of the dummy HWND, initialized that
> variable to NULL and everything works fine now. The HWND is only used
> for PeekMessage (where it's harmfull) and OpenClipboard() (where it's
> optional) so the whole thing can just be removed unless I am missing
> something.
>
> In addition the PeekMessage() loop should probably check for WM_QUIT,
> it currently ignores that even though the window proc actually sends
> it ;-).
>
>
> so long, benny
>
More information about the Cygwin-xfree
mailing list