From b2dee57f4fb6465ee94967a15d70e988d145fcc8 Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Tue, 27 Sep 2022 11:44:26 +0800 Subject: [PATCH] tune relaying of MSG_IDLE --- src/gui/window.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/window.c b/src/gui/window.c index 1ffa5c49..4ff39b85 100644 --- a/src/gui/window.c +++ b/src/gui/window.c @@ -2611,7 +2611,11 @@ static LRESULT DefaultSystemMsgHandler(PMAINWIN pWin, UINT message, the descendant control if the control captured the mouse event. */ HWND captured = GetCapture(); if (captured && GetMainWindowHandle(captured) == (HWND)pWin) { - PostMessage(captured, MSG_IDLE, wParam, lParam); + static DWORD last_tick_count; + if (wParam > last_tick_count + 100) { + PostMessage(captured, MSG_IDLE, wParam, lParam); + last_tick_count = wParam; + } } } else if (message == MSG_CARETBLINK && pWin->dwStyle & WS_VISIBLE) {