0
0
mirror of https://github.com/vim/vim.git synced 2025-10-02 05:04:20 -04:00

patch 8.2.2008: MS-Windows GUI: handling channel messages lags

Problem:    MS-Windows GUI: handling channel messages lags.
Solution:   Reduce the wait time from 100 to 10 msec. (closes #7097)
This commit is contained in:
Bram Moolenaar
2020-11-18 15:21:50 +01:00
parent 17ab28daa0
commit 032f40afb8
2 changed files with 8 additions and 3 deletions

View File

@@ -2134,7 +2134,10 @@ gui_mch_wait_for_chars(int wtime)
break;
}
else if (input_available()
|| MsgWaitForMultipleObjects(0, NULL, FALSE, 100,
// TODO: The 10 msec is a compromise between laggy response
// and consuming more CPU time. Better would be to handle
// channel messages when they arrive.
|| MsgWaitForMultipleObjects(0, NULL, FALSE, 10,
QS_ALLINPUT) != WAIT_TIMEOUT)
break;
}
@@ -8458,7 +8461,7 @@ make_tooltip(BalloonEval *beval, char *text, POINT pt)
TOOLINFOW *pti;
int ToolInfoSize;
if (multiline_balloon_available() == TRUE)
if (multiline_balloon_available())
ToolInfoSize = sizeof(TOOLINFOW_NEW);
else
ToolInfoSize = sizeof(TOOLINFOW);
@@ -8481,7 +8484,7 @@ make_tooltip(BalloonEval *beval, char *text, POINT pt)
pti->hinst = 0; // Don't use string resources
pti->uId = ID_BEVAL_TOOLTIP;
if (multiline_balloon_available() == TRUE)
if (multiline_balloon_available())
{
RECT rect;
TOOLINFOW_NEW *ptin = (TOOLINFOW_NEW *)pti;