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
bd9e6081
Commit
bd9e6081
authored
Oct 01, 2013
by
Aric Stewart
Committed by
Alexandre Julliard
Oct 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32: ImmGetCandidateWindow should not return unset data.
parent
02045662
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
imm.c
dlls/imm32/imm.c
+7
-0
imm32.c
dlls/imm32/tests/imm32.c
+18
-0
No files found.
dlls/imm32/imm.c
View file @
bd9e6081
...
...
@@ -636,6 +636,7 @@ HIMC WINAPI ImmCreateContext(void)
InputContextData
*
new_context
;
LPGUIDELINE
gl
;
LPCANDIDATEINFO
ci
;
int
i
;
new_context
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
InputContextData
));
...
...
@@ -663,6 +664,9 @@ HIMC WINAPI ImmCreateContext(void)
gl
->
dwSize
=
sizeof
(
GUIDELINE
);
ImmUnlockIMCC
(
new_context
->
IMC
.
hGuideLine
);
for
(
i
=
0
;
i
<
sizeof
(
new_context
->
IMC
.
cfCandForm
)
/
sizeof
(
CANDIDATEFORM
);
i
++
)
new_context
->
IMC
.
cfCandForm
[
i
].
dwIndex
=
~
0u
;
/* Initialize the IME Private */
new_context
->
IMC
.
hPrivate
=
ImmCreateIMCC
(
new_context
->
immKbd
->
imeInfo
.
dwPrivateDataSize
);
...
...
@@ -1035,6 +1039,9 @@ BOOL WINAPI ImmGetCandidateWindow(
if
(
dwIndex
>=
(
sizeof
(
data
->
IMC
.
cfCandForm
)
/
sizeof
(
CANDIDATEFORM
))
)
return
FALSE
;
if
(
data
->
IMC
.
cfCandForm
[
dwIndex
].
dwIndex
!=
dwIndex
)
return
FALSE
;
*
lpCandidate
=
data
->
IMC
.
cfCandForm
[
dwIndex
];
return
TRUE
;
...
...
dlls/imm32/tests/imm32.c
View file @
bd9e6081
...
...
@@ -465,6 +465,7 @@ static void test_ImmThreads(void)
BOOL
rc
;
LOGFONT
lf
;
COMPOSITIONFORM
cf
;
CANDIDATEFORM
cdf
;
DWORD
status
,
sentence
;
POINT
pt
;
...
...
@@ -552,6 +553,23 @@ static void test_ImmThreads(void)
rc
=
ImmGetStatusWindowPos
(
otherHimc
,
&
pt
);
ok
(
rc
!=
0
||
broken
(
rc
==
0
),
"ImmGetStatusWindowPos failed
\n
"
);
/* Candidate Window */
rc
=
ImmGetCandidateWindow
(
himc
,
0
,
&
cdf
);
ok
(
rc
==
0
,
"ImmGetCandidateWindow should fail
\n
"
);
cdf
.
dwIndex
=
0
;
cdf
.
dwStyle
=
CFS_CANDIDATEPOS
;
cdf
.
ptCurrentPos
.
x
=
0
;
cdf
.
ptCurrentPos
.
y
=
0
;
rc
=
ImmSetCandidateWindow
(
himc
,
&
cdf
);
ok
(
rc
==
1
,
"ImmSetCandidateWindow should succeed
\n
"
);
rc
=
ImmGetCandidateWindow
(
himc
,
0
,
&
cdf
);
ok
(
rc
==
1
,
"ImmGetCandidateWindow should succeed
\n
"
);
rc
=
ImmGetCandidateWindow
(
otherHimc
,
0
,
&
cdf
);
todo_wine
ok
(
rc
==
0
,
"ImmGetCandidateWindow should fail
\n
"
);
rc
=
ImmSetCandidateWindow
(
otherHimc
,
&
cdf
);
todo_wine
ok
(
rc
==
0
,
"ImmSetCandidateWindow should fail
\n
"
);
ImmReleaseContext
(
threadinfo
.
hwnd
,
otherHimc
);
ImmReleaseContext
(
hwnd
,
himc
);
...
...
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