4 modified files
reactos/subsys/win32k/ntuser
diff -u -r1.25 -r1.26
--- keyboard.c 24 Feb 2004 13:27:03 -0000 1.25
+++ keyboard.c 11 Mar 2004 16:17:25 -0000 1.26
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: keyboard.c,v 1.25 2004/02/24 13:27:03 weiden Exp $
+/* $Id: keyboard.c,v 1.26 2004/03/11 16:17:25 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -609,7 +609,6 @@
LONG UState = 0;
WCHAR wp[2] = { 0 };
MSG NewMsg = { 0 };
- PUSER_MESSAGE UMsg;
PKBDTABLES keyLayout;
BOOL Result = FALSE;
DWORD ScanCode = 0;
@@ -658,19 +657,15 @@
NewMsg.hwnd = lpMsg->hwnd;
NewMsg.wParam = dead_char;
NewMsg.lParam = lpMsg->lParam;
- UMsg = MsqCreateMessage(&NewMsg);
dead_char = 0;
- if (UMsg)
- MsqPostMessage(PsGetWin32Thread()->MessageQueue, UMsg);
+ MsqPostMessage(PsGetWin32Thread()->MessageQueue, &NewMsg);
}
NewMsg.hwnd = lpMsg->hwnd;
NewMsg.wParam = wp[0];
NewMsg.lParam = lpMsg->lParam;
- UMsg = MsqCreateMessage(&NewMsg);
DPRINT( "CHAR='%c' %04x %08x\n", wp[0], wp[0], lpMsg->lParam );
- if (UMsg)
- MsqPostMessage(PsGetWin32Thread()->MessageQueue, UMsg);
+ MsqPostMessage(PsGetWin32Thread()->MessageQueue, &NewMsg);
Result = TRUE;
}
else if (UState == -1)
@@ -681,9 +676,7 @@
NewMsg.wParam = wp[0];
NewMsg.lParam = lpMsg->lParam;
dead_char = wp[0];
- UMsg = MsqCreateMessage(&NewMsg);
- if (UMsg)
- MsqPostMessage(PsGetWin32Thread()->MessageQueue, UMsg);
+ MsqPostMessage(PsGetWin32Thread()->MessageQueue, &NewMsg);
Result = TRUE;
}
reactos/subsys/win32k/ntuser
diff -u -r1.53 -r1.54
--- message.c 11 Mar 2004 14:47:44 -0000 1.53
+++ message.c 11 Mar 2004 16:17:25 -0000 1.54
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: message.c,v 1.53 2004/03/11 14:47:44 weiden Exp $
+/* $Id: message.c,v 1.54 2004/03/11 16:17:25 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -483,7 +483,6 @@
{
PWINDOW_OBJECT Window;
MSG Mesg;
- PUSER_MESSAGE Message;
LARGE_INTEGER LargeTickCount;
if (WM_QUIT == Msg)
@@ -522,8 +521,7 @@
Mesg.pt.y = PsGetWin32Process()->WindowStation->SystemCursor.y;
KeQueryTickCount(&LargeTickCount);
Mesg.time = LargeTickCount.u.LowPart;
- Message = MsqCreateMessage(&Mesg);
- MsqPostMessage(Window->MessageQueue, Message);
+ MsqPostMessage(Window->MessageQueue, &Mesg);
IntReleaseWindowObject(Window);
}
@@ -538,7 +536,6 @@
{
MSG Mesg;
- PUSER_MESSAGE Message;
PETHREAD peThread;
PW32THREAD pThread;
NTSTATUS Status;
@@ -556,8 +553,7 @@
Mesg.message = Msg;
Mesg.wParam = wParam;
Mesg.lParam = lParam;
- Message = MsqCreateMessage(&Mesg);
- MsqPostMessage(pThread->MessageQueue, Message);
+ MsqPostMessage(pThread->MessageQueue, &Mesg);
ObDereferenceObject( peThread );
return TRUE;
} else {
reactos/subsys/win32k/ntuser
diff -u -r1.75 -r1.76
--- msgqueue.c 11 Mar 2004 14:47:44 -0000 1.75
+++ msgqueue.c 11 Mar 2004 16:17:25 -0000 1.76
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: msgqueue.c,v 1.75 2004/03/11 14:47:44 weiden Exp $
+/* $Id: msgqueue.c,v 1.76 2004/03/11 16:17:25 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -667,7 +667,6 @@
MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
PUSER_MESSAGE_QUEUE FocusMessageQueue;
- PUSER_MESSAGE Message;
MSG Msg;
DPRINT("MsqPostKeyboardMessage(uMsg 0x%x, wParam 0x%x, lParam 0x%x)\n",
@@ -682,8 +681,7 @@
FocusMessageQueue = IntGetFocusMessageQueue();
if( !IntGetScreenDC() ) {
if( W32kGetPrimitiveMessageQueue() ) {
- Message = MsqCreateMessage(&Msg);
- MsqPostMessage(W32kGetPrimitiveMessageQueue(), Message);
+ MsqPostMessage(W32kGetPrimitiveMessageQueue(), &Msg);
}
} else {
if (FocusMessageQueue == NULL)
@@ -696,8 +694,7 @@
{
Msg.hwnd = FocusMessageQueue->FocusWindow;
DPRINT("Msg.hwnd = %x\n", Msg.hwnd);
- Message = MsqCreateMessage(&Msg);
- MsqPostMessage(FocusMessageQueue, Message);
+ MsqPostMessage(FocusMessageQueue, &Msg);
}
else
{
@@ -710,7 +707,6 @@
MsqPostHotKeyMessage(PVOID Thread, HWND hWnd, WPARAM wParam, LPARAM lParam)
{
PWINDOW_OBJECT Window;
- PUSER_MESSAGE Message;
PW32THREAD Win32Thread;
PW32PROCESS Win32Process;
MSG Mesg;
@@ -753,8 +749,7 @@
// Mesg.pt.y = PsGetWin32Process()->WindowStation->SystemCursor.y;
// KeQueryTickCount(&LargeTickCount);
// Mesg.time = LargeTickCount.u.LowPart;
- Message = MsqCreateMessage(&Mesg);
- MsqPostMessage(Window->MessageQueue, Message);
+ MsqPostMessage(Window->MessageQueue, &Mesg);
ObmDereferenceObject(Window);
ObDereferenceObject (Thread);
@@ -766,13 +761,6 @@
}
-VOID FASTCALL
-MsqInitializeMessage(PUSER_MESSAGE Message,
- LPMSG Msg)
-{
- RtlMoveMemory(&Message->Msg, Msg, sizeof(MSG));
-}
-
PUSER_MESSAGE FASTCALL
MsqCreateMessage(LPMSG Msg)
{
@@ -784,7 +772,7 @@
return NULL;
}
- MsqInitializeMessage(Message, Msg);
+ RtlMoveMemory(&Message->Msg, Msg, sizeof(MSG));
return Message;
}
@@ -956,8 +944,14 @@
}
VOID FASTCALL
-MsqPostMessage(PUSER_MESSAGE_QUEUE MessageQueue, PUSER_MESSAGE Message)
+MsqPostMessage(PUSER_MESSAGE_QUEUE MessageQueue, MSG* Msg)
{
+ PUSER_MESSAGE Message;
+
+ if(!(Message = MsqCreateMessage(Msg)))
+ {
+ return;
+ }
IntLockMessageQueue(MessageQueue);
InsertTailList(&MessageQueue->PostedMessagesListHead,
&Message->ListEntry);
reactos/subsys/win32k/ntuser
diff -u -r1.26 -r1.27
--- timer.c 6 Mar 2004 23:09:23 -0000 1.26
+++ timer.c 11 Mar 2004 16:17:25 -0000 1.27
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: timer.c,v 1.26 2004/03/06 23:09:23 hbirr Exp $
+/* $Id: timer.c,v 1.27 2004/03/11 16:17:25 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -385,7 +385,7 @@
continue;
}
- MsqPostMessage(((PW32THREAD)Thread->Win32Thread)->MessageQueue, MsqCreateMessage(&MsgTimer->Msg));
+ MsqPostMessage(((PW32THREAD)Thread->Win32Thread)->MessageQueue, &MsgTimer->Msg);
ThreadsToDereference[ThreadsToDereferencePos] = Thread;
++ThreadsToDereferencePos;
CVSspam 0.2.8