Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
01677af4
Commit
01677af4
authored
Apr 08, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Apr 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32: Use INPUTCONTEXT directly in ImmGetCandidateWindow.
parent
cf03ab41
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
21 deletions
+17
-21
imm.c
dlls/imm32/imm.c
+10
-14
imm32.c
dlls/imm32/tests/imm32.c
+7
-7
No files found.
dlls/imm32/imm.c
View file @
01677af4
...
...
@@ -1390,25 +1390,21 @@ done:
/***********************************************************************
* ImmGetCandidateWindow (IMM32.@)
*/
BOOL
WINAPI
ImmGetCandidateWindow
(
HIMC
hIMC
,
DWORD
dwIndex
,
LPCANDIDATEFORM
lpCandidate
)
BOOL
WINAPI
ImmGetCandidateWindow
(
HIMC
himc
,
DWORD
index
,
CANDIDATEFORM
*
candidate
)
{
struct
imc
*
data
=
get_imc_data
(
hIMC
);
TRACE
(
"%p, %ld, %p
\n
"
,
hIMC
,
dwIndex
,
lpCandidate
);
if
(
!
data
||
!
lpCandidate
)
return
FALSE
;
INPUTCONTEXT
*
ctx
;
BOOL
ret
=
TRUE
;
if
(
dwIndex
>=
ARRAY_SIZE
(
data
->
IMC
.
cfCandForm
))
return
FALSE
;
TRACE
(
"himc %p, index %lu, candidate %p
\n
"
,
himc
,
index
,
candidate
);
if
(
data
->
IMC
.
cfCandForm
[
dwIndex
].
dwIndex
!=
dwIndex
)
return
FALSE
;
if
(
!
candidate
)
return
FALSE
;
*
lpCandidate
=
data
->
IMC
.
cfCandForm
[
dwIndex
];
if
(
!
(
ctx
=
ImmLockIMC
(
himc
)))
return
FALSE
;
if
(
ctx
->
cfCandForm
[
index
].
dwIndex
==
-
1
)
ret
=
FALSE
;
else
*
candidate
=
ctx
->
cfCandForm
[
index
];
ImmUnlockIMC
(
himc
);
return
TRUE
;
return
ret
;
}
/***********************************************************************
...
...
dlls/imm32/tests/imm32.c
View file @
01677af4
...
...
@@ -5653,21 +5653,21 @@ static void test_ImmGetCandidateWindow(void)
ok_eq
(
0xcdcdcdcd
,
cand_form
.
dwIndex
,
UINT
,
"%u"
);
ok_ret
(
0
,
ImmGetCandidateWindow
(
default_himc
,
3
,
&
cand_form
)
);
ok_eq
(
0xcdcdcdcd
,
cand_form
.
dwIndex
,
UINT
,
"%u"
);
todo_wine
ok_ret
(
1
,
ImmGetCandidateWindow
(
default_himc
,
4
,
&
cand_form
)
);
ok_ret
(
1
,
ImmGetCandidateWindow
(
default_himc
,
4
,
&
cand_form
)
);
ok_seq
(
empty_sequence
);
ok_ret
(
0
,
ImmGetCandidateWindow
(
himc
,
0
,
&
cand_form
)
);
ok_seq
(
empty_sequence
);
todo_wine
ok_seq
(
empty_sequence
);
ok_seq
(
empty_sequence
);
ok
(
!!
ctx
,
"ImmLockIMC failed, error %lu
\n
"
,
GetLastError
()
);
ctx
->
cfCandForm
[
0
]
=
expect_form
;
todo_wine
ok_ret
(
1
,
ImmGetCandidateWindow
(
himc
,
0
,
&
cand_form
)
);
todo_wine
check_candidate_form
(
&
cand_form
,
&
expect_form
);
ok_ret
(
1
,
ImmGetCandidateWindow
(
himc
,
0
,
&
cand_form
)
);
check_candidate_form
(
&
cand_form
,
&
expect_form
);
ok_seq
(
empty_sequence
);
todo_wine
ok_seq
(
empty_sequence
);
ok_seq
(
empty_sequence
);
ok
(
!!
ctx
,
"ImmLockIMC failed, error %lu
\n
"
,
GetLastError
()
);
ctx
->
cfCandForm
[
0
].
dwIndex
=
-
1
;
...
...
@@ -6481,8 +6481,8 @@ static void test_ImmSetCandidateWindow(void)
memset
(
&
cand_form
,
0xcd
,
sizeof
(
cand_form
)
);
ok_ret
(
0
,
ImmGetCandidateWindow
(
himc
,
0
,
&
cand_form
)
);
ok_eq
(
0xcdcdcdcd
,
cand_form
.
dwStyle
,
UINT
,
"%#x"
);
todo_wine
ok_ret
(
1
,
ImmGetCandidateWindow
(
himc
,
1
,
&
cand_form
)
);
todo_wine
check_candidate_form
(
&
cand_form
,
&
expect_form
);
ok_ret
(
1
,
ImmGetCandidateWindow
(
himc
,
1
,
&
cand_form
)
);
check_candidate_form
(
&
cand_form
,
&
expect_form
);
ok_ret
(
1
,
ImmGetCandidateWindow
(
himc
,
2
,
&
cand_form
)
);
check_candidate_form
(
&
cand_form
,
&
expect_form
);
ok_seq
(
empty_sequence
);
...
...
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