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.
This commit is contained in:
Alec Murphy 2025-04-10 08:30:16 -04:00
parent ebacbeafca
commit 4fa0873123

View file

@ -1,3 +1,5 @@
#define GUI_EVENT_WIN_REPAINT_TIMEOUT 100
U0 @gui_event_loop_handle_msg(IpcMessage* msg) U0 @gui_event_loop_handle_msg(IpcMessage* msg)
{ {
Window* win = NULL; 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_UP:
case CPZ_MSG_WIN_RIGHT_BTN_DOWN: case CPZ_MSG_WIN_RIGHT_BTN_DOWN:
case CPZ_MSG_WIN_KEY_PRESS: 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; win_repaint = TRUE;
break; break;
default: default: