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
01e072bb
Commit
01e072bb
authored
Oct 15, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32: Only call ImmSetActiveContext for active window in ImmAssociateContext.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e6d53d63
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
imm.c
dlls/imm32/imm.c
+6
-8
imm32.c
dlls/imm32/tests/imm32.c
+11
-2
No files found.
dlls/imm32/imm.c
View file @
01e072bb
...
...
@@ -592,12 +592,6 @@ HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC)
if
(
!
IsWindow
(
hWnd
)
||
(
hIMC
&&
!
data
))
return
NULL
;
/*
* If already associated just return
*/
if
(
hIMC
&&
data
->
IMC
.
hWnd
==
hWnd
)
return
hIMC
;
if
(
hIMC
&&
IMM_IsCrossThreadAccess
(
hWnd
,
hIMC
))
return
NULL
;
...
...
@@ -608,6 +602,7 @@ HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC)
else
if
(
old
==
(
HIMC
)
-
1
)
old
=
NULL
;
/* If already associated just return */
if
(
old
==
hIMC
)
return
hIMC
;
...
...
@@ -618,8 +613,11 @@ HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC)
else
SetPropW
(
hWnd
,
szwWineIMCProperty
,
hIMC
);
ImmSetActiveContext
(
hWnd
,
old
,
FALSE
);
ImmSetActiveContext
(
hWnd
,
hIMC
,
TRUE
);
if
(
GetActiveWindow
()
==
hWnd
)
{
ImmSetActiveContext
(
hWnd
,
old
,
FALSE
);
ImmSetActiveContext
(
hWnd
,
hIMC
,
TRUE
);
}
return
old
;
}
...
...
dlls/imm32/tests/imm32.c
View file @
01e072bb
...
...
@@ -662,6 +662,7 @@ static void test_ImmAssociateContextEx(void)
if
(
imc
)
{
HIMC
retimc
,
newimc
;
HWND
focus
;
SET_ENABLE
(
WM_IME_SETCONTEXT_ACTIVATE
,
TRUE
);
SET_ENABLE
(
WM_IME_SETCONTEXT_DEACTIVATE
,
TRUE
);
...
...
@@ -703,11 +704,19 @@ static void test_ImmAssociateContextEx(void)
ok
(
retimc
==
newimc
,
"handles should be the same
\n
"
);
ImmReleaseContext
(
hwnd
,
retimc
);
focus
=
CreateWindowA
(
"button"
,
"button"
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
ok
(
focus
!=
NULL
,
"CreateWindow failed
\n
"
);
SET_EXPECT
(
WM_IME_SETCONTEXT_DEACTIVATE
);
SetFocus
(
focus
);
todo_wine
CHECK_CALLED
(
WM_IME_SETCONTEXT_DEACTIVATE
);
rc
=
pImmAssociateContextEx
(
hwnd
,
imc
,
0
);
ok
(
rc
,
"ImmAssociateContextEx failed
\n
"
);
SET_EXPECT
(
WM_IME_SETCONTEXT_ACTIVATE
);
DestroyWindow
(
focus
);
todo_wine
CHECK_CALLED
(
WM_IME_SETCONTEXT_ACTIVATE
);
SetFocus
(
hwnd
);
rc
=
pImmAssociateContextEx
(
hwnd
,
NULL
,
IACE_DEFAULT
);
CHECK_CALLED
(
WM_IME_SETCONTEXT_DEACTIVATE
);
CHECK_CALLED
(
WM_IME_SETCONTEXT_ACTIVATE
);
ok
(
rc
,
"ImmAssociateContextEx failed
\n
"
);
SET_ENABLE
(
WM_IME_SETCONTEXT_ACTIVATE
,
FALSE
);
...
...
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