mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 09:16:17 +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 */
|
/* Post a keyboard message */
|
||||||
TRACE("Posting keyboard msg %u wParam 0x%x lParam 0x%x\n", Msg.message, Msg.wParam, Msg.lParam);
|
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;
|
return TRUE;
|
||||||
|
@ -1121,7 +1121,7 @@ IntTranslateKbdMessage(LPMSG lpMsg,
|
||||||
NewMsg.message = (lpMsg->message == WM_KEYDOWN) ? WM_CHAR : WM_SYSCHAR;
|
NewMsg.message = (lpMsg->message == WM_KEYDOWN) ? WM_CHAR : WM_SYSCHAR;
|
||||||
NewMsg.wParam = HIWORD(lpMsg->lParam);
|
NewMsg.wParam = HIWORD(lpMsg->lParam);
|
||||||
NewMsg.lParam = LOWORD(lpMsg->lParam);
|
NewMsg.lParam = LOWORD(lpMsg->lParam);
|
||||||
MsqPostMessage(pti->MessageQueue, &NewMsg, FALSE, QS_KEY);
|
MsqPostMessage(pti->MessageQueue, &NewMsg, FALSE, QS_KEY, 0);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1150,7 +1150,7 @@ IntTranslateKbdMessage(LPMSG lpMsg,
|
||||||
{
|
{
|
||||||
TRACE("Msg: %x '%lc' (%04x) %08x\n", NewMsg.message, wch[i], wch[i], NewMsg.lParam);
|
TRACE("Msg: %x '%lc' (%04x) %08x\n", NewMsg.message, wch[i], wch[i], NewMsg.lParam);
|
||||||
NewMsg.wParam = wch[i];
|
NewMsg.wParam = wch[i];
|
||||||
MsqPostMessage(pti->MessageQueue, &NewMsg, FALSE, QS_KEY);
|
MsqPostMessage(pti->MessageQueue, &NewMsg, FALSE, QS_KEY, 0);
|
||||||
}
|
}
|
||||||
bResult = TRUE;
|
bResult = TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1105,7 +1105,7 @@ UserPostThreadMessage( DWORD idThread,
|
||||||
|
|
||||||
KeQueryTickCount(&LargeTickCount);
|
KeQueryTickCount(&LargeTickCount);
|
||||||
Message.time = MsqCalculateMessageTime(&LargeTickCount);
|
Message.time = MsqCalculateMessageTime(&LargeTickCount);
|
||||||
MsqPostMessage(pThread->MessageQueue, &Message, FALSE, QS_POSTMESSAGE);
|
MsqPostMessage(pThread->MessageQueue, &Message, FALSE, QS_POSTMESSAGE, 0);
|
||||||
ObDereferenceObject( peThread );
|
ObDereferenceObject( peThread );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1228,7 +1228,7 @@ UserPostMessage( HWND Wnd,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MsqPostMessage(Window->head.pti->MessageQueue, &Message, FALSE, QS_POSTMESSAGE);
|
MsqPostMessage(Window->head.pti->MessageQueue, &Message, FALSE, QS_POSTMESSAGE, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -622,7 +622,7 @@ co_MsqInsertMouseMessage(MSG* Msg, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TRACE("Posting mouse message to hwnd=0x%x!\n", UserHMGetHandle(pwnd));
|
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)
|
else if (hdcScreen)
|
||||||
|
@ -675,7 +675,7 @@ MsqPostHotKeyMessage(PVOID Thread, HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
KeQueryTickCount(&LargeTickCount);
|
KeQueryTickCount(&LargeTickCount);
|
||||||
Mesg.time = MsqCalculateMessageTime(&LargeTickCount);
|
Mesg.time = MsqCalculateMessageTime(&LargeTickCount);
|
||||||
Mesg.pt = gpsi->ptCursor;
|
Mesg.pt = gpsi->ptCursor;
|
||||||
MsqPostMessage(Window->head.pti->MessageQueue, &Mesg, FALSE, Type);
|
MsqPostMessage(Window->head.pti->MessageQueue, &Mesg, FALSE, Type, 0);
|
||||||
UserDereferenceObject(Window);
|
UserDereferenceObject(Window);
|
||||||
ObDereferenceObject (Thread);
|
ObDereferenceObject (Thread);
|
||||||
|
|
||||||
|
@ -1252,8 +1252,11 @@ co_MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID FASTCALL
|
VOID FASTCALL
|
||||||
MsqPostMessage(PUSER_MESSAGE_QUEUE MessageQueue, MSG* Msg, BOOLEAN HardwareMessage,
|
MsqPostMessage(PUSER_MESSAGE_QUEUE MessageQueue,
|
||||||
DWORD MessageBits)
|
MSG* Msg,
|
||||||
|
BOOLEAN HardwareMessage,
|
||||||
|
DWORD MessageBits,
|
||||||
|
DWORD dwQEvent)
|
||||||
{
|
{
|
||||||
PUSER_MESSAGE Message;
|
PUSER_MESSAGE Message;
|
||||||
|
|
||||||
|
@ -1262,7 +1265,12 @@ MsqPostMessage(PUSER_MESSAGE_QUEUE MessageQueue, MSG* Msg, BOOLEAN HardwareMessa
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!HardwareMessage)
|
if (dwQEvent)
|
||||||
|
{
|
||||||
|
InsertHeadList(&MessageQueue->PostedMessagesListHead,
|
||||||
|
&Message->ListEntry);
|
||||||
|
}
|
||||||
|
else if (!HardwareMessage)
|
||||||
{
|
{
|
||||||
InsertTailList(&MessageQueue->PostedMessagesListHead,
|
InsertTailList(&MessageQueue->PostedMessagesListHead,
|
||||||
&Message->ListEntry);
|
&Message->ListEntry);
|
||||||
|
@ -1273,7 +1281,9 @@ MsqPostMessage(PUSER_MESSAGE_QUEUE MessageQueue, MSG* Msg, BOOLEAN HardwareMessa
|
||||||
&Message->ListEntry);
|
&Message->ListEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Message->dwQEvent = dwQEvent;
|
||||||
Message->QS_Flags = MessageBits;
|
Message->QS_Flags = MessageBits;
|
||||||
|
//Message->pti = pti; Fixed in ATI changes. See CORE-6551
|
||||||
MsqWakeQueue(MessageQueue, MessageBits, (MessageBits & QS_TIMER ? FALSE : TRUE));
|
MsqWakeQueue(MessageQueue, MessageBits, (MessageBits & QS_TIMER ? FALSE : TRUE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,9 @@ typedef struct _USER_MESSAGE
|
||||||
LIST_ENTRY ListEntry;
|
LIST_ENTRY ListEntry;
|
||||||
MSG Msg;
|
MSG Msg;
|
||||||
DWORD QS_Flags;
|
DWORD QS_Flags;
|
||||||
|
LONG_PTR ExtraInfo;
|
||||||
|
DWORD dwQEvent;
|
||||||
|
PTHREADINFO pti;
|
||||||
} USER_MESSAGE, *PUSER_MESSAGE;
|
} USER_MESSAGE, *PUSER_MESSAGE;
|
||||||
|
|
||||||
struct _USER_MESSAGE_QUEUE;
|
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);
|
UINT uTimeout, BOOL Block, INT HookMessage, ULONG_PTR *uResult);
|
||||||
PUSER_MESSAGE FASTCALL MsqCreateMessage(LPMSG Msg);
|
PUSER_MESSAGE FASTCALL MsqCreateMessage(LPMSG Msg);
|
||||||
VOID FASTCALL MsqDestroyMessage(PUSER_MESSAGE Message);
|
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);
|
VOID FASTCALL MsqPostQuitMessage(PUSER_MESSAGE_QUEUE MessageQueue, ULONG ExitCode);
|
||||||
BOOLEAN APIENTRY
|
BOOLEAN APIENTRY
|
||||||
MsqPeekMessage(IN PUSER_MESSAGE_QUEUE MessageQueue,
|
MsqPeekMessage(IN PUSER_MESSAGE_QUEUE MessageQueue,
|
||||||
|
|
|
@ -409,7 +409,7 @@ PostTimerMessages(PWND Window)
|
||||||
Msg.wParam = (WPARAM) pTmr->nID;
|
Msg.wParam = (WPARAM) pTmr->nID;
|
||||||
Msg.lParam = (LPARAM) pTmr->pfn;
|
Msg.lParam = (LPARAM) pTmr->pfn;
|
||||||
|
|
||||||
MsqPostMessage(ThreadQueue, &Msg, FALSE, QS_TIMER);
|
MsqPostMessage(ThreadQueue, &Msg, FALSE, QS_TIMER, 0);
|
||||||
pTmr->flags &= ~TMRF_READY;
|
pTmr->flags &= ~TMRF_READY;
|
||||||
pti->cTimersReady++;
|
pti->cTimersReady++;
|
||||||
Hit = TRUE;
|
Hit = TRUE;
|
||||||
|
|
|
@ -462,7 +462,6 @@ UserGetDCEx(PWND Wnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
||||||
((Dce->DCXFlags & DCX_CACHECOMPAREMASK) == DcxFlags))
|
((Dce->DCXFlags & DCX_CACHECOMPAREMASK) == DcxFlags))
|
||||||
{
|
{
|
||||||
UpdateClipOrigin = TRUE;
|
UpdateClipOrigin = TRUE;
|
||||||
//bUpdateVisRgn = FALSE;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue