mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:15:41 +00:00
[Win32k]
- Rewrite message events to use posting to queues instead of sending them. See CORE-6551. svn path=/trunk/; revision=57704
This commit is contained in:
parent
809352b8d8
commit
f6f71e3fd1
6 changed files with 25 additions and 13 deletions
|
@ -900,7 +900,7 @@ ProcessKeyEvent(WORD wVk, WORD wScanCode, DWORD dwFlags, BOOL bInjected, DWORD d
|
|||
|
||||
/* Post a keyboard message */
|
||||
TRACE("Posting keyboard msg %u wParam 0x%x lParam 0x%x\n", Msg.message, Msg.wParam, Msg.lParam);
|
||||
MsqPostMessage(pFocusQueue, &Msg, TRUE, QS_KEY);
|
||||
MsqPostMessage(pFocusQueue, &Msg, TRUE, QS_KEY, 0);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -1121,7 +1121,7 @@ IntTranslateKbdMessage(LPMSG lpMsg,
|
|||
NewMsg.message = (lpMsg->message == WM_KEYDOWN) ? WM_CHAR : WM_SYSCHAR;
|
||||
NewMsg.wParam = HIWORD(lpMsg->lParam);
|
||||
NewMsg.lParam = LOWORD(lpMsg->lParam);
|
||||
MsqPostMessage(pti->MessageQueue, &NewMsg, FALSE, QS_KEY);
|
||||
MsqPostMessage(pti->MessageQueue, &NewMsg, FALSE, QS_KEY, 0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1150,7 +1150,7 @@ IntTranslateKbdMessage(LPMSG lpMsg,
|
|||
{
|
||||
TRACE("Msg: %x '%lc' (%04x) %08x\n", NewMsg.message, wch[i], wch[i], NewMsg.lParam);
|
||||
NewMsg.wParam = wch[i];
|
||||
MsqPostMessage(pti->MessageQueue, &NewMsg, FALSE, QS_KEY);
|
||||
MsqPostMessage(pti->MessageQueue, &NewMsg, FALSE, QS_KEY, 0);
|
||||
}
|
||||
bResult = TRUE;
|
||||
}
|
||||
|
|
|
@ -1105,7 +1105,7 @@ UserPostThreadMessage( DWORD idThread,
|
|||
|
||||
KeQueryTickCount(&LargeTickCount);
|
||||
Message.time = MsqCalculateMessageTime(&LargeTickCount);
|
||||
MsqPostMessage(pThread->MessageQueue, &Message, FALSE, QS_POSTMESSAGE);
|
||||
MsqPostMessage(pThread->MessageQueue, &Message, FALSE, QS_POSTMESSAGE, 0);
|
||||
ObDereferenceObject( peThread );
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1228,7 +1228,7 @@ UserPostMessage( HWND Wnd,
|
|||
}
|
||||
else
|
||||
{
|
||||
MsqPostMessage(Window->head.pti->MessageQueue, &Message, FALSE, QS_POSTMESSAGE);
|
||||
MsqPostMessage(Window->head.pti->MessageQueue, &Message, FALSE, QS_POSTMESSAGE, 0);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
|
|
|
@ -622,7 +622,7 @@ co_MsqInsertMouseMessage(MSG* Msg, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook
|
|||
else
|
||||
{
|
||||
TRACE("Posting mouse message to hwnd=0x%x!\n", UserHMGetHandle(pwnd));
|
||||
MsqPostMessage(MessageQueue, Msg, TRUE, QS_MOUSEBUTTON);
|
||||
MsqPostMessage(MessageQueue, Msg, TRUE, QS_MOUSEBUTTON, 0);
|
||||
}
|
||||
}
|
||||
else if (hdcScreen)
|
||||
|
@ -675,7 +675,7 @@ MsqPostHotKeyMessage(PVOID Thread, HWND hWnd, WPARAM wParam, LPARAM lParam)
|
|||
KeQueryTickCount(&LargeTickCount);
|
||||
Mesg.time = MsqCalculateMessageTime(&LargeTickCount);
|
||||
Mesg.pt = gpsi->ptCursor;
|
||||
MsqPostMessage(Window->head.pti->MessageQueue, &Mesg, FALSE, Type);
|
||||
MsqPostMessage(Window->head.pti->MessageQueue, &Mesg, FALSE, Type, 0);
|
||||
UserDereferenceObject(Window);
|
||||
ObDereferenceObject (Thread);
|
||||
|
||||
|
@ -1252,8 +1252,11 @@ co_MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
|
|||
}
|
||||
|
||||
VOID FASTCALL
|
||||
MsqPostMessage(PUSER_MESSAGE_QUEUE MessageQueue, MSG* Msg, BOOLEAN HardwareMessage,
|
||||
DWORD MessageBits)
|
||||
MsqPostMessage(PUSER_MESSAGE_QUEUE MessageQueue,
|
||||
MSG* Msg,
|
||||
BOOLEAN HardwareMessage,
|
||||
DWORD MessageBits,
|
||||
DWORD dwQEvent)
|
||||
{
|
||||
PUSER_MESSAGE Message;
|
||||
|
||||
|
@ -1262,7 +1265,12 @@ MsqPostMessage(PUSER_MESSAGE_QUEUE MessageQueue, MSG* Msg, BOOLEAN HardwareMessa
|
|||
return;
|
||||
}
|
||||
|
||||
if(!HardwareMessage)
|
||||
if (dwQEvent)
|
||||
{
|
||||
InsertHeadList(&MessageQueue->PostedMessagesListHead,
|
||||
&Message->ListEntry);
|
||||
}
|
||||
else if (!HardwareMessage)
|
||||
{
|
||||
InsertTailList(&MessageQueue->PostedMessagesListHead,
|
||||
&Message->ListEntry);
|
||||
|
@ -1273,7 +1281,9 @@ MsqPostMessage(PUSER_MESSAGE_QUEUE MessageQueue, MSG* Msg, BOOLEAN HardwareMessa
|
|||
&Message->ListEntry);
|
||||
}
|
||||
|
||||
Message->dwQEvent = dwQEvent;
|
||||
Message->QS_Flags = MessageBits;
|
||||
//Message->pti = pti; Fixed in ATI changes. See CORE-6551
|
||||
MsqWakeQueue(MessageQueue, MessageBits, (MessageBits & QS_TIMER ? FALSE : TRUE));
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,9 @@ typedef struct _USER_MESSAGE
|
|||
LIST_ENTRY ListEntry;
|
||||
MSG Msg;
|
||||
DWORD QS_Flags;
|
||||
LONG_PTR ExtraInfo;
|
||||
DWORD dwQEvent;
|
||||
PTHREADINFO pti;
|
||||
} USER_MESSAGE, *PUSER_MESSAGE;
|
||||
|
||||
struct _USER_MESSAGE_QUEUE;
|
||||
|
@ -156,7 +159,7 @@ NTSTATUS FASTCALL co_MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
|
|||
UINT uTimeout, BOOL Block, INT HookMessage, ULONG_PTR *uResult);
|
||||
PUSER_MESSAGE FASTCALL MsqCreateMessage(LPMSG Msg);
|
||||
VOID FASTCALL MsqDestroyMessage(PUSER_MESSAGE Message);
|
||||
VOID FASTCALL MsqPostMessage(PUSER_MESSAGE_QUEUE MessageQueue, MSG* Msg, BOOLEAN HardwareMessage, DWORD MessageBits);
|
||||
VOID FASTCALL MsqPostMessage(PUSER_MESSAGE_QUEUE, MSG*, BOOLEAN, DWORD, DWORD);
|
||||
VOID FASTCALL MsqPostQuitMessage(PUSER_MESSAGE_QUEUE MessageQueue, ULONG ExitCode);
|
||||
BOOLEAN APIENTRY
|
||||
MsqPeekMessage(IN PUSER_MESSAGE_QUEUE MessageQueue,
|
||||
|
|
|
@ -409,7 +409,7 @@ PostTimerMessages(PWND Window)
|
|||
Msg.wParam = (WPARAM) pTmr->nID;
|
||||
Msg.lParam = (LPARAM) pTmr->pfn;
|
||||
|
||||
MsqPostMessage(ThreadQueue, &Msg, FALSE, QS_TIMER);
|
||||
MsqPostMessage(ThreadQueue, &Msg, FALSE, QS_TIMER, 0);
|
||||
pTmr->flags &= ~TMRF_READY;
|
||||
pti->cTimersReady++;
|
||||
Hit = TRUE;
|
||||
|
|
|
@ -462,7 +462,6 @@ UserGetDCEx(PWND Wnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
|||
((Dce->DCXFlags & DCX_CACHECOMPAREMASK) == DcxFlags))
|
||||
{
|
||||
UpdateClipOrigin = TRUE;
|
||||
//bUpdateVisRgn = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue