KeQueryTickCount(&TickCount);
Time = MsqCalculateMessageTime(&TickCount);
retval = co_IntCallWindowProc((WNDPROC)pMsg->lParam,
- TRUE,
- pMsg->hwnd,
- WM_TIMER,
- pMsg->wParam,
- (LPARAM)Time,
- sizeof(LPARAM));
+ TRUE,
+ pMsg->hwnd,
+ WM_TIMER,
+ pMsg->wParam,
+ (LPARAM)Time,
+ sizeof(LPARAM));
}
ObDereferenceObject(pti->pEThread);
return retval;
}
}
- if ( gspv.bMouseClickLock &&
+ if ( gspv.bMouseClickLock &&
( (Msg->message == WM_LBUTTONUP) ||
(Msg->message == WM_LBUTTONDOWN) ) )
{
do
{
- KeQueryTickCount(&LargeTickCount);
- ThreadQueue->LastMsgRead = LargeTickCount.u.LowPart;
-
- /* Dispatch sent messages here. */
- while (co_MsqDispatchOneSentMessage(ThreadQueue))
- ;
-
- /* Now look for a quit message. */
-
- if (ThreadQueue->QuitPosted)
- {
- /* According to the PSDK, WM_QUIT messages are always returned, regardless
- of the filter specified */
- Msg->Msg.hwnd = NULL;
- Msg->Msg.message = WM_QUIT;
- Msg->Msg.wParam = ThreadQueue->QuitExitCode;
- Msg->Msg.lParam = 0;
- if (RemoveMessages)
- {
- ThreadQueue->QuitPosted = FALSE;
- }
+ KeQueryTickCount(&LargeTickCount);
+ ThreadQueue->LastMsgRead = LargeTickCount.u.LowPart;
+
+ /* Dispatch sent messages here. */
+ while (co_MsqDispatchOneSentMessage(ThreadQueue))
+ ;
+
+ /* Now look for a quit message. */
+
+ if (ThreadQueue->QuitPosted)
+ {
+ /* According to the PSDK, WM_QUIT messages are always returned, regardless
+ of the filter specified */
+ Msg->Msg.hwnd = NULL;
+ Msg->Msg.message = WM_QUIT;
+ Msg->Msg.wParam = ThreadQueue->QuitExitCode;
+ Msg->Msg.lParam = 0;
+ if (RemoveMessages)
+ {
+ ThreadQueue->QuitPosted = FALSE;
+ }
return TRUE;
- }
+ }
- /* Now check for normal messages. */
+ /* Now check for normal messages. */
if (co_MsqFindMessage( ThreadQueue,
- FALSE,
- RemoveMessages,
- Window,
- MsgFilterMin,
- MsgFilterMax,
+ FALSE,
+ RemoveMessages,
+ Window,
+ MsgFilterMin,
+ MsgFilterMax,
&Message ))
- {
- RtlCopyMemory(Msg, Message, sizeof(USER_MESSAGE));
- if (RemoveMessages)
- {
- MsqDestroyMessage(Message);
- }
+ {
+ RtlCopyMemory(Msg, Message, sizeof(USER_MESSAGE));
+ if (RemoveMessages)
+ {
+ MsqDestroyMessage(Message);
+ }
break;
- }
+ }
- /* Check for hardware events. */
+ /* Check for hardware events. */
if(co_MsqFindMessage( ThreadQueue,
- TRUE,
- RemoveMessages,
- Window,
- MsgFilterMin,
- MsgFilterMax,
+ TRUE,
+ RemoveMessages,
+ Window,
+ MsgFilterMin,
+ MsgFilterMax,
&Message ))
- {
- RtlCopyMemory(Msg, Message, sizeof(USER_MESSAGE));
- if (RemoveMessages)
- {
- MsqDestroyMessage(Message);
- }
+ {
+ RtlCopyMemory(Msg, Message, sizeof(USER_MESSAGE));
+ if (RemoveMessages)
+ {
+ MsqDestroyMessage(Message);
+ }
if(!ProcessHardwareMessage(&Msg->Msg, RemoveMessages))
continue;
break;
- }
+ }
- /* Check for sent messages again. */
- while (co_MsqDispatchOneSentMessage(ThreadQueue))
- ;
+ /* Check for sent messages again. */
+ while (co_MsqDispatchOneSentMessage(ThreadQueue))
+ ;
- /* Check for paint messages. */
+ /* Check for paint messages. */
if( IntGetPaintMessage( Window,
- MsgFilterMin,
- MsgFilterMax,
- pti,
- &Msg->Msg,
- RemoveMessages))
- {
+ MsgFilterMin,
+ MsgFilterMax,
+ pti,
+ &Msg->Msg,
+ RemoveMessages))
+ {
break;
- }
+ }
- if (PostTimerMessages(Window))
- {
+ if (PostTimerMessages(Window))
+ {
continue;
- }
+ }
- return FALSE;
- }
+ return FALSE;
+ }
while (TRUE);
- // The WH_GETMESSAGE hook enables an application to monitor messages about to
- // be returned by the GetMessage or PeekMessage function.
+ // The WH_GETMESSAGE hook enables an application to monitor messages about to
+ // be returned by the GetMessage or PeekMessage function.
- co_HOOK_CallHooks( WH_GETMESSAGE, HC_ACTION, RemoveMsg & PM_REMOVE, (LPARAM)&Msg->Msg);
- return TRUE;
+ co_HOOK_CallHooks( WH_GETMESSAGE, HC_ACTION, RemoveMsg & PM_REMOVE, (LPARAM)&Msg->Msg);
+ return TRUE;
}
static NTSTATUS FASTCALL
return FALSE;
}
- if (!Wnd)
+ if (!Wnd)
return UserPostThreadMessage( PtrToInt(PsGetCurrentThreadId()),
Msg,
wParam,
if (List != NULL)
{
+ UserPostMessage(DesktopWindow->head.h, Msg, wParam, lParam);
for (i = 0; List[i]; i++)
UserPostMessage(List[i], Msg, wParam, lParam);
ExFreePool(List);
do
{
Status = co_MsqSendMessage( Window->head.pti->MessageQueue,
- hWnd,
- Msg,
- wParam,
- lParam,
- uTimeout,
- (uFlags & SMTO_BLOCK),
- MSQ_NORMAL,
- uResult );
+ hWnd,
+ Msg,
+ wParam,
+ lParam,
+ uTimeout,
+ (uFlags & SMTO_BLOCK),
+ MSQ_NORMAL,
+ uResult );
}
while ((STATUS_TIMEOUT == Status) &&
(uFlags & SMTO_NOTIMEOUTIFNOTHUNG) &&
return 0;
}
+ /* Send message to the desktop window too! */
+ co_IntSendMessageTimeoutSingle(DesktopWindow->head.h, Msg, wParam, lParam, uFlags, uTimeout, uResult);
+
Children = IntWinListChildren(DesktopWindow);
if (NULL == Children)
{
if (List != NULL)
{
+ UserSendNotifyMessage(DesktopWindow->head.h, Msg, wParam, lParam);
for (i = 0; List[i]; i++)
{
UserSendNotifyMessage(List[i], Msg, wParam, lParam);
BOOL Hit = FALSE;
MSG SafeMsg;
- UserEnterExclusive();
+ UserEnterExclusive();
_SEH2_TRY
{
ProbeForRead(UnsafeMsgInfo, sizeof(MSG), 1);
Hit = TRUE;
}
_SEH2_END;
-
+
if (!Hit) Res = IntDispatchMessage(&SafeMsg);
UserLeave();
{
BadChk = TRUE;
}
- _SEH2_END;
+ _SEH2_END;
}
break;
default:
- break;
+ break;
}
UserLeave();