mirror of
https://github.com/reactos/reactos.git
synced 2024-10-02 23:46:50 +00:00
Set the message point/time for keyboard and hotkey messages.
svn path=/trunk/; revision=14899
This commit is contained in:
parent
4913443e7e
commit
0c23b97544
|
@ -632,6 +632,10 @@ IntTranslateKbdMessage(LPMSG lpMsg,
|
|||
|
||||
IntLockQueueState;
|
||||
|
||||
/* All messages have to contain the cursor point. */
|
||||
IntGetCursorLocation(PsGetWin32Thread()->Desktop->WindowStation,
|
||||
&NewMsg.pt);
|
||||
|
||||
UState = ToUnicodeInner(lpMsg->wParam, HIWORD(lpMsg->lParam) & 0xff,
|
||||
QueueKeyStateTable, wp, 2, 0,
|
||||
keyLayout );
|
||||
|
@ -659,6 +663,7 @@ IntTranslateKbdMessage(LPMSG lpMsg,
|
|||
|
||||
DPRINT("FINAL CHAR: %c\n", wp[0]);
|
||||
}
|
||||
|
||||
if (dead_char)
|
||||
{
|
||||
NewMsg.hwnd = lpMsg->hwnd;
|
||||
|
|
|
@ -617,6 +617,7 @@ MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
PUSER_MESSAGE_QUEUE FocusMessageQueue;
|
||||
MSG Msg;
|
||||
LARGE_INTEGER LargeTickCount;
|
||||
|
||||
DPRINT("MsqPostKeyboardMessage(uMsg 0x%x, wParam 0x%x, lParam 0x%x)\n",
|
||||
uMsg, wParam, lParam);
|
||||
|
@ -625,10 +626,15 @@ MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
Msg.message = uMsg;
|
||||
Msg.wParam = wParam;
|
||||
Msg.lParam = lParam;
|
||||
/* FIXME: Initialize time and point. */
|
||||
|
||||
KeQueryTickCount(&LargeTickCount);
|
||||
Msg.time = LargeTickCount.u.LowPart;
|
||||
/* We can't get the Msg.pt point here since we don't know thread
|
||||
(and thus the window station) the message will end up in yet. */
|
||||
|
||||
FocusMessageQueue = IntGetFocusMessageQueue();
|
||||
if( !IntGetScreenDC() ) {
|
||||
/* FIXME: What to do about Msg.pt here? */
|
||||
if( W32kGetPrimitiveMessageQueue() ) {
|
||||
MsqPostMessage(W32kGetPrimitiveMessageQueue(), &Msg, FALSE, QS_KEY);
|
||||
}
|
||||
|
@ -643,6 +649,8 @@ MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
Msg.hwnd = FocusMessageQueue->FocusWindow;
|
||||
DPRINT("Msg.hwnd = %x\n", Msg.hwnd);
|
||||
IntGetCursorLocation(FocusMessageQueue->Desktop->WindowStation,
|
||||
&Msg.pt);
|
||||
MsqPostMessage(FocusMessageQueue, &Msg, FALSE, QS_KEY);
|
||||
}
|
||||
else
|
||||
|
@ -659,6 +667,7 @@ MsqPostHotKeyMessage(PVOID Thread, HWND hWnd, WPARAM wParam, LPARAM lParam)
|
|||
PW32THREAD Win32Thread;
|
||||
PWINSTATION_OBJECT WinSta;
|
||||
MSG Mesg;
|
||||
LARGE_INTEGER LargeTickCount;
|
||||
NTSTATUS Status;
|
||||
|
||||
Status = ObReferenceObjectByPointer (Thread,
|
||||
|
@ -688,10 +697,9 @@ MsqPostHotKeyMessage(PVOID Thread, HWND hWnd, WPARAM wParam, LPARAM lParam)
|
|||
Mesg.message = WM_HOTKEY;
|
||||
Mesg.wParam = wParam;
|
||||
Mesg.lParam = lParam;
|
||||
// Mesg.pt.x = PsGetWin32Process()->WindowStation->SystemCursor.x;
|
||||
// Mesg.pt.y = PsGetWin32Process()->WindowStation->SystemCursor.y;
|
||||
// KeQueryTickCount(&LargeTickCount);
|
||||
// Mesg.time = LargeTickCount.u.LowPart;
|
||||
KeQueryTickCount(&LargeTickCount);
|
||||
Mesg.time = LargeTickCount.u.LowPart;
|
||||
IntGetCursorLocation(WinSta, &Mesg.pt);
|
||||
MsqPostMessage(Window->MessageQueue, &Mesg, FALSE, QS_HOTKEY);
|
||||
ObmDereferenceObject(Window);
|
||||
ObDereferenceObject (Thread);
|
||||
|
|
Loading…
Reference in a new issue