Author: jimtabor
Date: Wed Nov 14 03:45:55 2012
New Revision: 57704
URL:
http://svn.reactos.org/svn/reactos?rev=57704&view=rev
Log:
[Win32k]
- Rewrite message events to use posting to queues instead of sending them. See CORE-6551.
Modified:
trunk/reactos/win32ss/user/ntuser/keyboard.c
trunk/reactos/win32ss/user/ntuser/message.c
trunk/reactos/win32ss/user/ntuser/msgqueue.c
trunk/reactos/win32ss/user/ntuser/msgqueue.h
trunk/reactos/win32ss/user/ntuser/timer.c
trunk/reactos/win32ss/user/ntuser/windc.c
Modified: trunk/reactos/win32ss/user/ntuser/keyboard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/keyboa…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/keyboard.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/keyboard.c [iso-8859-1] Wed Nov 14 03:45:55 2012
@@ -900,7 +900,7 @@
/* 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 @@
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 @@
{
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;
}
Modified: trunk/reactos/win32ss/user/ntuser/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/messag…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/message.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/message.c [iso-8859-1] Wed Nov 14 03:45:55 2012
@@ -1105,7 +1105,7 @@
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 @@
}
else
{
- MsqPostMessage(Window->head.pti->MessageQueue, &Message, FALSE,
QS_POSTMESSAGE);
+ MsqPostMessage(Window->head.pti->MessageQueue, &Message, FALSE,
QS_POSTMESSAGE, 0);
}
}
return TRUE;
Modified: trunk/reactos/win32ss/user/ntuser/msgqueue.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/msgque…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/msgqueue.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/msgqueue.c [iso-8859-1] Wed Nov 14 03:45:55 2012
@@ -622,7 +622,7 @@
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 @@
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 @@
}
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 @@
return;
}
- if(!HardwareMessage)
+ if (dwQEvent)
+ {
+ InsertHeadList(&MessageQueue->PostedMessagesListHead,
+ &Message->ListEntry);
+ }
+ else if (!HardwareMessage)
{
InsertTailList(&MessageQueue->PostedMessagesListHead,
&Message->ListEntry);
@@ -1273,7 +1281,9 @@
&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));
}
Modified: trunk/reactos/win32ss/user/ntuser/msgqueue.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/msgque…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/msgqueue.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/msgqueue.h [iso-8859-1] Wed Nov 14 03:45:55 2012
@@ -23,6 +23,9 @@
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 @@
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,
Modified: trunk/reactos/win32ss/user/ntuser/timer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/timer.…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/timer.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/timer.c [iso-8859-1] Wed Nov 14 03:45:55 2012
@@ -409,7 +409,7 @@
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;
Modified: trunk/reactos/win32ss/user/ntuser/windc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/windc.…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/windc.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/windc.c [iso-8859-1] Wed Nov 14 03:45:55 2012
@@ -462,7 +462,6 @@
((Dce->DCXFlags & DCX_CACHECOMPAREMASK) == DcxFlags))
{
UpdateClipOrigin = TRUE;
- //bUpdateVisRgn = FALSE;
break;
}
}