mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-02-07 02:52:42 +08:00
fix the bug reported in Issue #89
This commit is contained in:
@@ -4507,7 +4507,9 @@ int __mg_join_all_message_threads (void)
|
||||
|
||||
list_for_each (l, &msg_queue_list) {
|
||||
MSGQUEUE *msg_queue = (MSGQUEUE*)l;
|
||||
#ifndef NDEBUG
|
||||
dump_message_queue (msg_queue, __func__);
|
||||
#endif
|
||||
pthread_cancel (msg_queue->th);
|
||||
}
|
||||
|
||||
|
||||
@@ -823,8 +823,9 @@ checkagain:
|
||||
goto got_ret;
|
||||
}
|
||||
}
|
||||
else
|
||||
else {
|
||||
pMsgQueue->dwState &= ~QS_POSTMSG;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1410,6 +1411,9 @@ LRESULT GUIAPI DispatchMessage (PMSG pMsg)
|
||||
to the controls of the main window will be thrown away as well. */
|
||||
int __mg_throw_away_messages (PMSGQUEUE pMsgQueue, HWND hWnd)
|
||||
{
|
||||
/* For a main window, we use pMainWin to check whether we
|
||||
should throw away a message for controls of the main window.
|
||||
Note that checkAndGetMainWindowIfControl returns NULL for non control. */
|
||||
PMAINWIN pMainWin = (PMAINWIN)hWnd;
|
||||
PMSG pMsg;
|
||||
PQMSG pQMsg;
|
||||
@@ -1421,16 +1425,6 @@ int __mg_throw_away_messages (PMSGQUEUE pMsgQueue, HWND hWnd)
|
||||
|
||||
LOCK_MSGQ (pMsgQueue);
|
||||
|
||||
/* for virtual window and main window, use pMainWin to check whether we
|
||||
should throw away a message for controls of a main window.
|
||||
checkAndGetMainWindowIfControl returns NULL for non control. */
|
||||
if (pMainWin != HWND_NULL && pMainWin != HWND_INVALID &&
|
||||
(pMainWin->WinType == TYPE_MAINWIN ||
|
||||
pMainWin->WinType == TYPE_VIRTWIN))
|
||||
pMainWin = (PMAINWIN)hWnd;
|
||||
else
|
||||
pMainWin = NULL;
|
||||
|
||||
if (pMsgQueue->pFirstNotifyMsg) {
|
||||
PQMSG pPrev = NULL, pNext;
|
||||
pQMsg = pMsgQueue->pFirstNotifyMsg;
|
||||
|
||||
Reference in New Issue
Block a user