mirror of
https://github.com/reactos/reactos.git
synced 2025-07-03 09:11:25 +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
2 changed files with 18 additions and 5 deletions
|
@ -632,6 +632,10 @@ IntTranslateKbdMessage(LPMSG lpMsg,
|
||||||
|
|
||||||
IntLockQueueState;
|
IntLockQueueState;
|
||||||
|
|
||||||
|
/* All messages have to contain the cursor point. */
|
||||||
|
IntGetCursorLocation(PsGetWin32Thread()->Desktop->WindowStation,
|
||||||
|
&NewMsg.pt);
|
||||||
|
|
||||||
UState = ToUnicodeInner(lpMsg->wParam, HIWORD(lpMsg->lParam) & 0xff,
|
UState = ToUnicodeInner(lpMsg->wParam, HIWORD(lpMsg->lParam) & 0xff,
|
||||||
QueueKeyStateTable, wp, 2, 0,
|
QueueKeyStateTable, wp, 2, 0,
|
||||||
keyLayout );
|
keyLayout );
|
||||||
|
@ -659,6 +663,7 @@ IntTranslateKbdMessage(LPMSG lpMsg,
|
||||||
|
|
||||||
DPRINT("FINAL CHAR: %c\n", wp[0]);
|
DPRINT("FINAL CHAR: %c\n", wp[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dead_char)
|
if (dead_char)
|
||||||
{
|
{
|
||||||
NewMsg.hwnd = lpMsg->hwnd;
|
NewMsg.hwnd = lpMsg->hwnd;
|
||||||
|
|
|
@ -617,6 +617,7 @@ MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
PUSER_MESSAGE_QUEUE FocusMessageQueue;
|
PUSER_MESSAGE_QUEUE FocusMessageQueue;
|
||||||
MSG Msg;
|
MSG Msg;
|
||||||
|
LARGE_INTEGER LargeTickCount;
|
||||||
|
|
||||||
DPRINT("MsqPostKeyboardMessage(uMsg 0x%x, wParam 0x%x, lParam 0x%x)\n",
|
DPRINT("MsqPostKeyboardMessage(uMsg 0x%x, wParam 0x%x, lParam 0x%x)\n",
|
||||||
uMsg, wParam, lParam);
|
uMsg, wParam, lParam);
|
||||||
|
@ -625,10 +626,15 @@ MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
Msg.message = uMsg;
|
Msg.message = uMsg;
|
||||||
Msg.wParam = wParam;
|
Msg.wParam = wParam;
|
||||||
Msg.lParam = lParam;
|
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();
|
FocusMessageQueue = IntGetFocusMessageQueue();
|
||||||
if( !IntGetScreenDC() ) {
|
if( !IntGetScreenDC() ) {
|
||||||
|
/* FIXME: What to do about Msg.pt here? */
|
||||||
if( W32kGetPrimitiveMessageQueue() ) {
|
if( W32kGetPrimitiveMessageQueue() ) {
|
||||||
MsqPostMessage(W32kGetPrimitiveMessageQueue(), &Msg, FALSE, QS_KEY);
|
MsqPostMessage(W32kGetPrimitiveMessageQueue(), &Msg, FALSE, QS_KEY);
|
||||||
}
|
}
|
||||||
|
@ -643,6 +649,8 @@ MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
Msg.hwnd = FocusMessageQueue->FocusWindow;
|
Msg.hwnd = FocusMessageQueue->FocusWindow;
|
||||||
DPRINT("Msg.hwnd = %x\n", Msg.hwnd);
|
DPRINT("Msg.hwnd = %x\n", Msg.hwnd);
|
||||||
|
IntGetCursorLocation(FocusMessageQueue->Desktop->WindowStation,
|
||||||
|
&Msg.pt);
|
||||||
MsqPostMessage(FocusMessageQueue, &Msg, FALSE, QS_KEY);
|
MsqPostMessage(FocusMessageQueue, &Msg, FALSE, QS_KEY);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -659,6 +667,7 @@ MsqPostHotKeyMessage(PVOID Thread, HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
PW32THREAD Win32Thread;
|
PW32THREAD Win32Thread;
|
||||||
PWINSTATION_OBJECT WinSta;
|
PWINSTATION_OBJECT WinSta;
|
||||||
MSG Mesg;
|
MSG Mesg;
|
||||||
|
LARGE_INTEGER LargeTickCount;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
Status = ObReferenceObjectByPointer (Thread,
|
Status = ObReferenceObjectByPointer (Thread,
|
||||||
|
@ -688,10 +697,9 @@ MsqPostHotKeyMessage(PVOID Thread, HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
Mesg.message = WM_HOTKEY;
|
Mesg.message = WM_HOTKEY;
|
||||||
Mesg.wParam = wParam;
|
Mesg.wParam = wParam;
|
||||||
Mesg.lParam = lParam;
|
Mesg.lParam = lParam;
|
||||||
// Mesg.pt.x = PsGetWin32Process()->WindowStation->SystemCursor.x;
|
KeQueryTickCount(&LargeTickCount);
|
||||||
// Mesg.pt.y = PsGetWin32Process()->WindowStation->SystemCursor.y;
|
Mesg.time = LargeTickCount.u.LowPart;
|
||||||
// KeQueryTickCount(&LargeTickCount);
|
IntGetCursorLocation(WinSta, &Mesg.pt);
|
||||||
// Mesg.time = LargeTickCount.u.LowPart;
|
|
||||||
MsqPostMessage(Window->MessageQueue, &Mesg, FALSE, QS_HOTKEY);
|
MsqPostMessage(Window->MessageQueue, &Mesg, FALSE, QS_HOTKEY);
|
||||||
ObmDereferenceObject(Window);
|
ObmDereferenceObject(Window);
|
||||||
ObDereferenceObject (Thread);
|
ObDereferenceObject (Thread);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue