Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
5fb543f6
Commit
5fb543f6
authored
Feb 03, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Feb 05, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: In TranslateMessage, handle ToUnicode returning 2 or more chars.
parent
77de5768
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
message.c
dlls/user32/message.c
+14
-12
No files found.
dlls/user32/message.c
View file @
5fb543f6
...
...
@@ -3803,8 +3803,9 @@ BOOL WINAPI IsDialogMessageA( HWND hwndDlg, LPMSG pmsg )
BOOL
WINAPI
TranslateMessage
(
const
MSG
*
msg
)
{
UINT
message
;
WCHAR
wp
[
2
];
WCHAR
wp
[
8
];
BYTE
state
[
256
];
INT
len
;
if
(
msg
->
message
<
WM_KEYFIRST
||
msg
->
message
>
WM_KEYLAST
)
return
FALSE
;
if
(
msg
->
message
!=
WM_KEYDOWN
&&
msg
->
message
!=
WM_SYSKEYDOWN
)
return
TRUE
;
...
...
@@ -3826,22 +3827,23 @@ BOOL WINAPI TranslateMessage( const MSG *msg )
}
GetKeyboardState
(
state
);
/* FIXME : should handle ToUnicode yielding 2 */
switch
(
ToUnicode
(
msg
->
wParam
,
HIWORD
(
msg
->
lParam
),
state
,
wp
,
2
,
0
)
)
len
=
ToUnicode
(
msg
->
wParam
,
HIWORD
(
msg
->
lParam
),
state
,
wp
,
sizeof
(
wp
)
/
sizeof
(
WCHAR
),
0
);
if
(
len
==
-
1
)
{
case
1
:
message
=
(
msg
->
message
==
WM_KEYDOWN
)
?
WM_CHAR
:
WM_SYSCHAR
;
TRACE_
(
key
)(
"1 -> PostMessageW(%p,%s,%04x,%08lx)
\n
"
,
msg
->
hwnd
,
SPY_GetMsgName
(
message
,
msg
->
hwnd
),
wp
[
0
],
msg
->
lParam
);
PostMessageW
(
msg
->
hwnd
,
message
,
wp
[
0
],
msg
->
lParam
);
break
;
case
-
1
:
message
=
(
msg
->
message
==
WM_KEYDOWN
)
?
WM_DEADCHAR
:
WM_SYSDEADCHAR
;
TRACE_
(
key
)(
"-1 -> PostMessageW(%p,%s,%04x,%08lx)
\n
"
,
msg
->
hwnd
,
SPY_GetMsgName
(
message
,
msg
->
hwnd
),
wp
[
0
],
msg
->
lParam
);
PostMessageW
(
msg
->
hwnd
,
message
,
wp
[
0
],
msg
->
lParam
);
break
;
}
else
if
(
len
>
0
)
{
INT
i
;
message
=
(
msg
->
message
==
WM_KEYDOWN
)
?
WM_CHAR
:
WM_SYSCHAR
;
TRACE_
(
key
)(
"%d -> PostMessageW(%p,%s,<x>,%08lx) for <x> in %s
\n
"
,
len
,
msg
->
hwnd
,
SPY_GetMsgName
(
message
,
msg
->
hwnd
),
msg
->
lParam
,
debugstr_wn
(
wp
,
len
));
for
(
i
=
0
;
i
<
len
;
i
++
)
PostMessageW
(
msg
->
hwnd
,
message
,
wp
[
i
],
msg
->
lParam
);
}
return
TRUE
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment