tune code for virtual window

This commit is contained in:
Vincent Wei
2020-02-15 23:02:51 +08:00
parent a12b75cd1b
commit 2727e0c2db
5 changed files with 30 additions and 28 deletions
+3 -3
View File
@@ -2457,7 +2457,7 @@ static LRESULT DesktopWinProc (HWND hWnd, UINT message,
pWin = (PMAINWIN)(nodes[fixed_slots[slot]].hwnd);
if (pWin && (pWin->WinType != TYPE_CONTROL) &&
(pWin->pHosting == NULL)) {
if ((pMsgQueue = kernel_GetMsgQueue((HWND)pWin))) {
if ((pMsgQueue = getMsgQueue((HWND)pWin))) {
POST_MSGQ(pMsgQueue);
}
}
@@ -2469,7 +2469,7 @@ static LRESULT DesktopWinProc (HWND hWnd, UINT message,
pWin = (PMAINWIN)(nodes[slot].hwnd);
if (pWin && (pWin->WinType != TYPE_CONTROL) &&
(pWin->pHosting == NULL)) {
if ((pMsgQueue = kernel_GetMsgQueue((HWND)pWin))) {
if ((pMsgQueue = getMsgQueue((HWND)pWin))) {
POST_MSGQ(pMsgQueue);
}
}
@@ -2480,7 +2480,7 @@ static LRESULT DesktopWinProc (HWND hWnd, UINT message,
pWin = (PMAINWIN)(nodes[slot].hwnd);
if (pWin && (pWin->WinType == TYPE_MAINWIN) &&
(pWin->pHosting == NULL)){
if ((pMsgQueue = kernel_GetMsgQueue((HWND)pWin))) {
if ((pMsgQueue = getMsgQueue((HWND)pWin))) {
POST_MSGQ(pMsgQueue);
}
}
+2 -2
View File
@@ -145,8 +145,8 @@ void* __kernel_desktop_main (void* data)
MSG Msg;
/* init message queue of desktop thread */
if (!(__mg_dsk_msg_queue = mg_AllocMsgQueueThisThread ()) ) {
_WRN_PRINTF ("KERNEL>Desktop: mg_AllocMsgQueueThisThread failure!\n");
if (!(__mg_dsk_msg_queue = mg_AllocMsgQueueForThisThread ()) ) {
_WRN_PRINTF ("KERNEL>Desktop: mg_AllocMsgQueueForThisThread failure!\n");
return NULL;
}
+2 -2
View File
@@ -257,7 +257,7 @@ ndef __USE_TIMER_THREAD
return NULL;
}
/* The following function is moved to src/include/internals.h as inline functions.
/* The following functions were moved to src/include/internals.h as inline.
static inline BOOL createThreadInfoKey (void)
{
if (pthread_key_create (&__mg_threadinfo_key, NULL))
@@ -270,7 +270,7 @@ static inline void deleteThreadInfoKey (void)
pthread_key_delete (__mg_threadinfo_key);
}
MSGQUEUE* GetMsgQueueThisThread (void)
MSGQUEUE* mg_GetMsgQueueForThisThread (void)
{
return (MSGQUEUE*) pthread_getspecific (__mg_threadinfo_key);
}