mirror of
https://github.com/vim/vim.git
synced 2025-10-01 04:54:07 -04:00
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)
This commit is contained in:
@@ -2073,20 +2073,23 @@ gui_mch_wait_for_chars(int wtime)
|
|||||||
did_add_timer = FALSE;
|
did_add_timer = FALSE;
|
||||||
#endif
|
#endif
|
||||||
#ifdef MESSAGE_QUEUE
|
#ifdef MESSAGE_QUEUE
|
||||||
/* Check channel while waiting message. */
|
/* Check channel I/O while waiting for a message. */
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
MSG msg;
|
MSG msg;
|
||||||
|
|
||||||
parse_queued_messages();
|
parse_queued_messages();
|
||||||
|
|
||||||
if (pPeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)
|
if (pPeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE))
|
||||||
|| MsgWaitForMultipleObjects(0, NULL, FALSE, 100, QS_ALLINPUT)
|
{
|
||||||
!= WAIT_TIMEOUT)
|
process_message();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (MsgWaitForMultipleObjects(0, NULL, FALSE, 100, QS_ALLINPUT)
|
||||||
|
!= WAIT_TIMEOUT)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#else
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Don't use gui_mch_update() because then we will spin-lock until a
|
* Don't use gui_mch_update() because then we will spin-lock until a
|
||||||
* char arrives, instead we use GetMessage() to hang until an
|
* 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
|
* returning as soon as it contains a single char -- webb
|
||||||
*/
|
*/
|
||||||
process_message();
|
process_message();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (input_available())
|
if (input_available())
|
||||||
{
|
{
|
||||||
|
@@ -769,6 +769,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
925,
|
||||||
/**/
|
/**/
|
||||||
924,
|
924,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user