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:
parent
ebacbeafca
commit
4fa0873123
1 changed files with 3 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue