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)
diff --git a/src/gui_w32.c b/src/gui_w32.c
index b296861..80a70e2 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -2134,7 +2134,10 @@
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 @@
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 @@
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;