Author: weiden
Date: Tue Nov 20 22:58:51 2007
New Revision: 30604
URL:
http://svn.reactos.org/svn/reactos?rev=30604&view=rev
Log:
Optimize TranslateMessage() to only call win32k for messages that need to be translated
Modified:
trunk/reactos/dll/win32/user32/windows/message.c
Modified: trunk/reactos/dll/win32/user32/windows/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/message.c (original)
+++ trunk/reactos/dll/win32/user32/windows/message.c Tue Nov 20 22:58:51 2007
@@ -2067,7 +2067,17 @@
BOOL STDCALL
TranslateMessageEx(CONST MSG *lpMsg, DWORD unk)
{
- return(NtUserTranslateMessage((LPMSG)lpMsg, (HKL)unk));
+ switch (lpMsg->message)
+ {
+ case WM_KEYDOWN:
+ case WM_KEYUP:
+ case WM_SYSKEYDOWN:
+ case WM_SYSKEYUP:
+ return(NtUserTranslateMessage((LPMSG)lpMsg, (HKL)unk));
+
+ default:
+ return FALSE;
+ }
}