Permalink
Browse files

patch 8.0.0925: MS-Windows GUI: channel I/O not handled right away

Problem:    MS-Windows GUI: channel I/O not handled right away.
Solution:   Don't call process_message() unless a message is available.
            (Yasuhiro Matsumoto, closes #1969)
  • Loading branch information...
brammool committed Aug 13, 2017
1 parent 5cc1f2c commit 62426e168ef29fb941d1bd91a112fa09445322a5
Showing with 12 additions and 6 deletions.
  1. +10 −6 src/gui_w32.c
  2. +2 −0 src/version.c
View
@@ -2073,27 +2073,31 @@ gui_mch_wait_for_chars(int wtime)
did_add_timer = FALSE;
#endif
#ifdef MESSAGE_QUEUE
/* Check channel while waiting message. */
/* Check channel I/O while waiting for a message. */
for (;;)
{
MSG msg;
parse_queued_messages();
if (pPeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)
|| MsgWaitForMultipleObjects(0, NULL, FALSE, 100, QS_ALLINPUT)
!= WAIT_TIMEOUT)
if (pPeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE))
{
process_message();
break;
}
else if (MsgWaitForMultipleObjects(0, NULL, FALSE, 100, QS_ALLINPUT)
!= WAIT_TIMEOUT)
break;
}
#endif
#else
/*
* Don't use gui_mch_update() because then we will spin-lock until a
* char arrives, instead we use GetMessage() to hang until an
* event arrives. No need to check for input_buf_full because we are
* returning as soon as it contains a single char -- webb
*/
process_message();
#endif
if (input_available())
{
View
@@ -769,6 +769,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
925,
/**/
924,
/**/

0 comments on commit 62426e1

Please sign in to comment.