user32/tests: Make the initial timeout longer in flush_events() for machines with slower round-trip times.
This commit is contained in:
parent
de928a09ec
commit
d6a17d2c93
|
@ -45,13 +45,15 @@ static void flush_events(void)
|
|||
{
|
||||
MSG msg;
|
||||
int diff = default_timeout;
|
||||
int min_timeout = 50;
|
||||
DWORD time = GetTickCount() + diff;
|
||||
|
||||
while (diff > 0)
|
||||
{
|
||||
if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min(10,diff), QS_ALLINPUT ) == WAIT_TIMEOUT) break;
|
||||
if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min_timeout, QS_ALLINPUT ) == WAIT_TIMEOUT) break;
|
||||
while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg );
|
||||
diff = time - GetTickCount();
|
||||
min_timeout = 10;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1543,14 +1543,16 @@ static void add_message(const struct message *msg)
|
|||
static void flush_events(void)
|
||||
{
|
||||
MSG msg;
|
||||
int diff = 100;
|
||||
int diff = 200;
|
||||
int min_timeout = 50;
|
||||
DWORD time = GetTickCount() + diff;
|
||||
|
||||
while (diff > 0)
|
||||
{
|
||||
if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min(10,diff), QS_ALLINPUT ) == WAIT_TIMEOUT) break;
|
||||
if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min_timeout, QS_ALLINPUT ) == WAIT_TIMEOUT) break;
|
||||
while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg );
|
||||
diff = time - GetTickCount();
|
||||
min_timeout = 10;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,13 +63,15 @@ static void flush_events(void)
|
|||
{
|
||||
MSG msg;
|
||||
int diff = 200;
|
||||
int min_timeout = 50;
|
||||
DWORD time = GetTickCount() + diff;
|
||||
|
||||
while (diff > 0)
|
||||
{
|
||||
if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min(10,diff), QS_ALLINPUT ) == WAIT_TIMEOUT) break;
|
||||
if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min_timeout, QS_ALLINPUT ) == WAIT_TIMEOUT) break;
|
||||
while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg );
|
||||
diff = time - GetTickCount();
|
||||
min_timeout = 10;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue