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
8d0e7d8c
Commit
8d0e7d8c
authored
Apr 03, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Apr 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32: Cleanup parameters and traces in ImmTranslateMessage.
parent
10174320
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
21 deletions
+16
-21
imm.c
dlls/imm32/imm.c
+16
-21
No files found.
dlls/imm32/imm.c
View file @
8d0e7d8c
...
...
@@ -3014,52 +3014,47 @@ BOOL WINAPI ImmGenerateMessage(HIMC hIMC)
* ImmTranslateMessage(IMM32.@)
* ( Undocumented, call internally and from user32.dll )
*/
BOOL
WINAPI
ImmTranslateMessage
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lKeyData
)
BOOL
WINAPI
ImmTranslateMessage
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
static
const
DWORD
list_count
=
10
;
UINT
scan
,
vkey
,
count
,
i
;
struct
imc
*
data
;
struct
ime
*
ime
;
BYTE
state
[
256
];
UINT
scancode
;
TRANSMSGLIST
*
list
=
NULL
;
UINT
msg_count
,
i
;
UINT
uVirtKey
;
static
const
DWORD
list_count
=
10
;
WCHAR
chr
;
TRACE
(
"%p %x %x %x
\n
"
,
hwnd
,
msg
,
(
UINT
)
wParam
,
(
UINT
)
lKeyData
);
TRACE
(
"hwnd %p, msg %#x, wparam %#Ix, lparam %#Ix
\n
"
,
hwnd
,
msg
,
wparam
,
lparam
);
if
(
!
(
data
=
get_imc_data
(
ImmGetContext
(
hwnd
)
)))
return
FALSE
;
if
(
!
(
ime
=
imc_select_ime
(
data
)))
return
FALSE
;
if
(
data
->
lastVK
==
VK_PROCESSKEY
)
return
FALSE
;
GetKeyboardState
(
state
);
scan
code
=
lKeyData
>>
0x10
&
0xff
;
uVirtK
ey
=
data
->
lastVK
;
GetKeyboardState
(
state
);
scan
=
lparam
>>
0x10
&
0xff
;
vk
ey
=
data
->
lastVK
;
list
=
calloc
(
list_count
,
sizeof
(
TRANSMSG
)
+
sizeof
(
DWORD
)
);
list
->
uMsgCount
=
list_count
;
if
(
ime
->
info
.
fdwProperty
&
IME_PROP_KBD_CHAR_FIRST
)
{
WCHAR
chr
;
if
(
!
ime_is_unicode
(
ime
))
ToAscii
(
data
->
lastVK
,
scancode
,
state
,
&
chr
,
0
);
else
ToUnicodeEx
(
data
->
lastVK
,
scancode
,
state
,
&
chr
,
1
,
0
,
GetKeyboardLayout
(
0
));
uVirtKey
=
MAKELONG
(
data
->
lastVK
,
chr
);
if
(
!
ime_is_unicode
(
ime
))
ToAscii
(
data
->
lastVK
,
scan
,
state
,
&
chr
,
0
);
else
ToUnicodeEx
(
data
->
lastVK
,
scan
,
state
,
&
chr
,
1
,
0
,
GetKeyboardLayout
(
0
)
);
vkey
=
MAKELONG
(
data
->
lastVK
,
chr
);
}
msg_count
=
ime
->
pImeToAsciiEx
(
uVirtKey
,
scancode
,
state
,
list
,
0
,
data
->
handle
);
TRACE
(
"%i messages generated
\n
"
,
msg_count
);
count
=
ime
->
pImeToAsciiEx
(
vkey
,
scan
,
state
,
list
,
0
,
data
->
handle
);
TRACE
(
"%u messages generated
\n
"
,
count
);
if
(
msg_
count
>
list_count
)
ImmGenerateMessage
(
data
->
handle
);
else
for
(
i
=
0
;
i
<
msg_
count
;
i
++
)
imc_post_message
(
data
,
list
->
TransMsg
+
i
);
if
(
count
>
list_count
)
ImmGenerateMessage
(
data
->
handle
);
else
for
(
i
=
0
;
i
<
count
;
i
++
)
imc_post_message
(
data
,
list
->
TransMsg
+
i
);
free
(
list
);
data
->
lastVK
=
VK_PROCESSKEY
;
return
(
msg_count
>
0
)
;
return
count
>
0
;
}
/***********************************************************************
...
...
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