summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-08-13 15:37:58 +0200
committerBram Moolenaar <Bram@vim.org>2017-08-13 15:37:58 +0200
commit62426e168ef29fb941d1bd91a112fa09445322a5 (patch)
tree0722d65cf5547970f1b4eeca7a88e3af2ae352b6
parent5cc1f2c47796f2f544ace9283d293af3b036a63f (diff)
patch 8.0.0925: MS-Windows GUI: channel I/O not handled right awayv8.0.0925
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)
-rw-r--r--src/gui_w32.c16
-rw-r--r--src/version.c2
2 files changed, 12 insertions, 6 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 863975c7f4..e94379ba7c 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -2073,20 +2073,23 @@ 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
@@ -2094,6 +2097,7 @@ gui_mch_wait_for_chars(int wtime)
* returning as soon as it contains a single char -- webb
*/
process_message();
+#endif
if (input_available())
{
diff --git a/src/version.c b/src/version.c
index ec75b71204..67e96e6152 100644
--- a/src/version.c
+++ b/src/version.c
@@ -770,6 +770,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 925,
+/**/
924,
/**/
923,