server: Set the idle event when PeekMessage is called with -1 as window filter.

This commit is contained in:
Alexandre Julliard 2010-03-03 13:19:13 +01:00
parent 4d33d4982f
commit b0760fc2e9
2 changed files with 43 additions and 0 deletions

View File

@ -12080,6 +12080,13 @@ static const struct
{ 0, 0, FALSE },
{ 0, WAIT_TIMEOUT, FALSE },
{ 0, 0, FALSE },
{ 0, 0, FALSE },
/* 15 */ { 0, 0, FALSE },
{ WAIT_TIMEOUT, 0, FALSE },
{ WAIT_TIMEOUT, 0, FALSE },
{ WAIT_TIMEOUT, 0, FALSE },
{ WAIT_TIMEOUT, 0, FALSE },
/* 20 */ { WAIT_TIMEOUT, 0, FALSE },
};
static DWORD CALLBACK do_wait_idle_child_thread( void *arg )
@ -12205,6 +12212,41 @@ static void do_wait_idle_child( int arg )
WaitForSingleObject( thread, 10000 );
CloseHandle( thread );
break;
case 14:
SetEvent( start_event );
Sleep( 200 );
PeekMessage( &msg, HWND_TOPMOST, 0, 0, PM_NOREMOVE );
break;
case 15:
SetEvent( start_event );
Sleep( 200 );
PeekMessage( &msg, HWND_BROADCAST, 0, 0, PM_NOREMOVE );
break;
case 16:
SetEvent( start_event );
Sleep( 200 );
PeekMessage( &msg, HWND_BOTTOM, 0, 0, PM_NOREMOVE );
break;
case 17:
SetEvent( start_event );
Sleep( 200 );
PeekMessage( &msg, (HWND)0xdeadbeef, 0, 0, PM_NOREMOVE );
break;
case 18:
SetEvent( start_event );
Sleep( 200 );
PeekMessage( &msg, HWND_NOTOPMOST, 0, 0, PM_NOREMOVE );
break;
case 19:
SetEvent( start_event );
Sleep( 200 );
PeekMessage( &msg, HWND_MESSAGE, 0, 0, PM_NOREMOVE );
break;
case 20:
SetEvent( start_event );
Sleep( 200 );
PeekMessage( &msg, GetDesktopWindow(), 0, 0, PM_NOREMOVE );
break;
}
WaitForSingleObject( end_event, 2000 );
CloseHandle( start_event );

View File

@ -1819,6 +1819,7 @@ DECL_HANDLER(get_message)
return;
}
if (get_win == -1 && current->process->idle_event) set_event( current->process->idle_event );
queue->wake_mask = req->wake_mask;
queue->changed_mask = req->changed_mask;
set_error( STATUS_PENDING ); /* FIXME */