testcancel in PeekMessageEx and WaitMessage

This commit is contained in:
Vincent Wei
2020-02-18 22:23:22 +08:00
parent ad59a477c6
commit 0b3ed4808b
+7
View File
@@ -201,6 +201,7 @@ void mg_FreeMsgQueueForThisThread (void)
}
#ifdef _MGHAVE_VIRTUAL_WINDOW
/* no use function */
MSGQUEUE* mg_GetMsgQueueForThisThread (BOOL alloc)
{
MSGQUEUE* pMsgQueue;
@@ -214,6 +215,8 @@ MSGQUEUE* mg_GetMsgQueueForThisThread (BOOL alloc)
if (pMsgQueue == NULL && alloc) {
pMsgQueue = mg_AllocMsgQueueForThisThread ();
SendMessage (HWND_DESKTOP, MSG_MANAGE_MSGTHREAD,
MSGTHREAD_SIGNIN, (LPARAM)pMsgQueue);
}
return pMsgQueue;
@@ -797,6 +800,8 @@ BOOL PeekMessageEx (PMSG pMsg, HWND hWnd, UINT nMsgFilterMin, UINT nMsgFilterMax
checkagain:
TEST_CANCEL;
TEST_IF_QUIT(pMsgQueue, hWnd);
LOCK_MSGQ (pMsgQueue);
@@ -1081,6 +1086,8 @@ BOOL GUIAPI WaitMessage (PMSG pMsg, HWND hWnd)
checkagain:
TEST_CANCEL;
TEST_IF_QUIT(pMsgQueue, hWnd);
LOCK_MSGQ (pMsgQueue);