From 4fa0873123682acf839ba7c5c064b96d61604e5a Mon Sep 17 00:00:00 2001 From: Alec Murphy Date: Thu, 10 Apr 2025 08:30:16 -0400 Subject: [PATCH] Include/Gui: Set GUI_EVENT_WIN_REPAINT_TIMEOUT to 100ms If an Ipc Message that will trigger a window repaint is received by a Client, and the message is older than GUI_EVENT_WIN_REPAINT_TIMEOUT, discard the repaint request. --- Include/Gui.HC | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Include/Gui.HC b/Include/Gui.HC index 69a7a26..94519a1 100644 --- a/Include/Gui.HC +++ b/Include/Gui.HC @@ -1,3 +1,5 @@ +#define GUI_EVENT_WIN_REPAINT_TIMEOUT 100 + U0 @gui_event_loop_handle_msg(IpcMessage* msg) { Window* win = NULL; @@ -36,7 +38,7 @@ U0 @gui_event_loop_handle_msg(IpcMessage* msg) case CPZ_MSG_WIN_RIGHT_BTN_UP: case CPZ_MSG_WIN_RIGHT_BTN_DOWN: case CPZ_MSG_WIN_KEY_PRESS: - if (!win->explicit_repaint) + if (!win->explicit_repaint && cnts.jiffies < msg->timestamp + GUI_EVENT_WIN_REPAINT_TIMEOUT) win_repaint = TRUE; break; default: