simon-svn: putty: simon

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Fri Oct 25 18:44:02 BST 2013


SVN root:       svn://svn.tartarus.org/sgt
Changes by:     simon
Revision:       10052
Date:           2013-10-25 18:44:02 +0100 (Fri, 25 Oct 2013)

Log message (12 lines):
Avoid leaving unread Windows messages in the queue.

Jochen Erwied points out that once you've used PeekMessage to remove
_one_ message from the message queue, MsgWaitForMultipleObjects will
consider the whole queue to have been 'read', or at least looked at
and deemed uninteresting, and so it will block until a further message
comes in. Hence, my change in r10040 which stops us from looping on
PeekMessage until the queue is empty has the effect of causing the
rest of the message queue not to be acted on until a new message comes
in to unblock it. Fix by checking if the queue is nonempty in advance
of calling MsgWaitForMultipleObjects, and if so, giving it a zero
timeout just as we do if there's a pending toplevel callback.

Modified files:
U   putty/windows/window.c

Links:
http://svn.tartarus.org/sgt/?rev=10052&view=rev
http://svn.tartarus.org/sgt/putty/windows/window.c?rev=10052&r1=10051&r2=10052



More information about the tartarus-commits mailing list