mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 09:17:14 +00:00
joy.cpl: Process messages while waiting for the input threads.
Instead of interrupting the wait on any message.
This commit is contained in:
parent
39dc9d09f3
commit
37025bdabd
|
@ -792,7 +792,16 @@ INT_PTR CALLBACK test_di_dialog_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM
|
|||
case PSN_RESET:
|
||||
case PSN_KILLACTIVE:
|
||||
SetEvent( thread_stop );
|
||||
MsgWaitForMultipleObjects( 1, &thread, FALSE, INFINITE, 0 );
|
||||
/* wait for the input thread to stop, processing any WM_USER message from it */
|
||||
while (MsgWaitForMultipleObjects( 1, &thread, FALSE, INFINITE, QS_ALLINPUT ) == 1)
|
||||
{
|
||||
MSG msg;
|
||||
while (PeekMessageW( &msg, 0, 0, 0, PM_REMOVE ))
|
||||
{
|
||||
TranslateMessage( &msg );
|
||||
DispatchMessageW( &msg );
|
||||
}
|
||||
}
|
||||
CloseHandle( state_event );
|
||||
CloseHandle( thread_stop );
|
||||
CloseHandle( thread );
|
||||
|
|
|
@ -428,7 +428,16 @@ extern INT_PTR CALLBACK test_xi_dialog_proc( HWND hwnd, UINT msg, WPARAM wparam,
|
|||
case PSN_RESET:
|
||||
case PSN_KILLACTIVE:
|
||||
SetEvent( thread_stop );
|
||||
MsgWaitForMultipleObjects( 1, &thread, FALSE, INFINITE, 0 );
|
||||
/* wait for the input thread to stop, processing any WM_USER message from it */
|
||||
while (MsgWaitForMultipleObjects( 1, &thread, FALSE, INFINITE, QS_ALLINPUT ) == 1)
|
||||
{
|
||||
MSG msg;
|
||||
while (PeekMessageW( &msg, 0, 0, 0, PM_REMOVE ))
|
||||
{
|
||||
TranslateMessage( &msg );
|
||||
DispatchMessageW( &msg );
|
||||
}
|
||||
}
|
||||
CloseHandle( thread_stop );
|
||||
CloseHandle( thread );
|
||||
dialog_hwnd = 0;
|
||||
|
|
Loading…
Reference in a new issue