mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-31 00:51:04 +03:00
refact, win, clipboard, notify callback, tmp commit
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
@@ -1455,7 +1455,8 @@ UINT wait_response_event(wfClipboard *clipboard, HANDLE event, void **data)
|
||||
clipboard->context->IsStopped = FALSE;
|
||||
DWORD waitOnceTimeoutMillis = 50;
|
||||
int waitCount = 1000 * clipboard->context->ResponseWaitTimeoutSecs / waitOnceTimeoutMillis;
|
||||
for (int i = 0; i < waitCount * 3; i++)
|
||||
int i = 0;
|
||||
for (; i < waitCount; i++)
|
||||
{
|
||||
DWORD waitRes = WaitForSingleObject(event, waitOnceTimeoutMillis);
|
||||
if (waitRes == WAIT_TIMEOUT && clipboard->context->IsStopped == FALSE)
|
||||
@@ -1488,6 +1489,16 @@ UINT wait_response_event(wfClipboard *clipboard, HANDLE event, void **data)
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (i == waitCount)
|
||||
{
|
||||
NOTIFICATION_MESSAGE msg;
|
||||
msg.type = 2;
|
||||
msg.msg = "timeout waiting for response";
|
||||
msg.details = NULL;
|
||||
clipboard->context->NotifyClipboardMsg(&msg);
|
||||
rc = ERROR_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
if ((*data) != NULL)
|
||||
{
|
||||
if (!ResetEvent(event))
|
||||
|
||||
Reference in New Issue
Block a user