Use alertable waits in PeekMessage16 and GetMessage16 so we can
process APCs for 16bit comms.
This commit is contained in:
parent
64295971be
commit
096524c5bf
|
@ -568,6 +568,7 @@ INT16 WINAPI OpenComm16(LPCSTR device,UINT16 cbInQueue,UINT16 cbOutQueue)
|
|||
COM[port].write_ov.hEvent = CreateEventA(NULL,0,0,NULL);
|
||||
|
||||
comm_waitread( &COM[port] );
|
||||
USER16_AlertableWait++;
|
||||
|
||||
return port;
|
||||
}
|
||||
|
@ -612,6 +613,7 @@ INT16 WINAPI CloseComm16(INT16 cid)
|
|||
UnMapLS( COM[cid].seg_unknown );
|
||||
CloseHandle(COM[cid].read_ov.hEvent);
|
||||
CloseHandle(COM[cid].write_ov.hEvent);
|
||||
USER16_AlertableWait--;
|
||||
|
||||
/* free buffers */
|
||||
free(ptr->outbuf);
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
DEFAULT_DEBUG_CHANNEL(msg);
|
||||
|
||||
DWORD USER16_AlertableWait = 0;
|
||||
|
||||
/***********************************************************************
|
||||
* SendMessage (USER.111)
|
||||
|
@ -147,6 +148,8 @@ BOOL16 WINAPI PeekMessage32_16( MSG32_16 *msg16, HWND16 hwnd16,
|
|||
MSG msg;
|
||||
HWND hwnd = WIN_Handle32( hwnd16 );
|
||||
|
||||
if(USER16_AlertableWait)
|
||||
MsgWaitForMultipleObjectsEx( 0, NULL, 1, 0, MWMO_ALERTABLE );
|
||||
if (!PeekMessageW( &msg, hwnd, first, last, flags )) return FALSE;
|
||||
|
||||
msg16->msg.hwnd = WIN_Handle16( msg.hwnd );
|
||||
|
@ -183,6 +186,8 @@ BOOL16 WINAPI GetMessage32_16( MSG32_16 *msg16, HWND16 hwnd16, UINT16 first,
|
|||
|
||||
do
|
||||
{
|
||||
if(USER16_AlertableWait)
|
||||
MsgWaitForMultipleObjectsEx( 0, NULL, INFINITE, 0, MWMO_ALERTABLE );
|
||||
GetMessageW( &msg, hwnd, first, last );
|
||||
msg16->msg.hwnd = WIN_Handle16( msg.hwnd );
|
||||
msg16->msg.lParam = msg.lParam;
|
||||
|
|
|
@ -120,4 +120,6 @@ extern WINE_LOOK TWEAK_WineLook;
|
|||
/* gray brush cache */
|
||||
extern HBRUSH CACHE_GetPattern55AABrush(void);
|
||||
|
||||
extern DWORD USER16_AlertableWait;
|
||||
|
||||
#endif /* __WINE_USER_H */
|
||||
|
|
Loading…
Reference in New Issue