[ros-diffs] [rharabien] 54014: [WIN32K] - Don't send unicode characters in WM_CHAR to ascii windows
rharabien at svn.reactos.org
rharabien at svn.reactos.org
Wed Oct 5 19:11:00 UTC 2011
Author: rharabien
Date: Wed Oct 5 19:11:00 2011
New Revision: 54014
URL: http://svn.reactos.org/svn/reactos?rev=54014&view=rev
Log:
[WIN32K] - Don't send unicode characters in WM_CHAR to ascii windows
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c?rev=54014&r1=54013&r2=54014&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c [iso-8859-1] Wed Oct 5 19:11:00 2011
@@ -1050,7 +1050,15 @@
for (i = 0; i < cch; ++i)
{
TRACE("Msg: %x '%lc' (%04x) %08x\n", NewMsg.message, wch[i], wch[i], NewMsg.lParam);
- NewMsg.wParam = wch[i];
+ if (pWnd->Unicode)
+ NewMsg.wParam = wch[i];
+ else
+ {
+ CHAR ch;
+ if (!NT_SUCCESS(RtlUnicodeToMultiByteN(&ch, sizeof(ch), NULL, &wch[i], sizeof(wch[i]))))
+ WARN("RtlUnicodeToMultiByteN failed!\n");
+ NewMsg.wParam = ch;
+ }
MsqPostMessage(pti->MessageQueue, &NewMsg, FALSE, QS_KEY);
}
bResult = TRUE;
More information about the Ros-diffs
mailing list