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
f84d88d4
Commit
f84d88d4
authored
Oct 16, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32: Only call ImmSetActiveContext for focused window in ImmAssociateContext.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
374ad339
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
imm.c
dlls/imm32/imm.c
+1
-1
imm32.c
dlls/imm32/tests/imm32.c
+17
-1
No files found.
dlls/imm32/imm.c
View file @
f84d88d4
...
...
@@ -771,7 +771,7 @@ HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC)
else
SetPropW
(
hWnd
,
szwWineIMCProperty
,
hIMC
);
if
(
Get
ActiveWindow
()
==
hWnd
)
if
(
Get
Focus
()
==
hWnd
)
{
ImmSetActiveContext
(
hWnd
,
old
,
FALSE
);
ImmSetActiveContext
(
hWnd
,
hIMC
,
TRUE
);
...
...
dlls/imm32/tests/imm32.c
View file @
f84d88d4
...
...
@@ -207,7 +207,7 @@ static void msg_spy_cleanup(void) {
static
const
char
wndcls
[]
=
"winetest_imm32_wndcls"
;
static
enum
{
PHASE_UNKNOWN
,
FIRST_WINDOW
,
SECOND_WINDOW
,
CREATE_CANCEL
,
NCCREATE_CANCEL
,
IME_DISABLED
}
test_phase
;
static
HWND
hwnd
;
static
HWND
hwnd
,
child
;
static
HWND
get_ime_window
(
void
);
...
...
@@ -326,6 +326,10 @@ static BOOL init(void) {
if
(
!
hwnd
)
return
FALSE
;
child
=
CreateWindowA
(
"edit"
,
"edit"
,
WS_CHILD
|
WS_VISIBLE
,
0
,
0
,
50
,
50
,
hwnd
,
0
,
0
,
0
);
if
(
!
child
)
return
FALSE
;
ShowWindow
(
hwnd
,
SW_SHOWNORMAL
);
UpdateWindow
(
hwnd
);
...
...
@@ -726,9 +730,21 @@ static void test_ImmAssociateContextEx(void)
SET_EXPECT
(
WM_IME_SETCONTEXT_ACTIVATE
);
DestroyWindow
(
focus
);
CHECK_CALLED
(
WM_IME_SETCONTEXT_ACTIVATE
);
SET_EXPECT
(
WM_IME_SETCONTEXT_DEACTIVATE
);
SetFocus
(
child
);
CHECK_CALLED
(
WM_IME_SETCONTEXT_DEACTIVATE
);
rc
=
pImmAssociateContextEx
(
hwnd
,
newimc
,
0
);
ok
(
rc
,
"ImmAssociateContextEx failed
\n
"
);
SET_EXPECT
(
WM_IME_SETCONTEXT_ACTIVATE
);
SetFocus
(
hwnd
);
CHECK_CALLED
(
WM_IME_SETCONTEXT_ACTIVATE
);
SET_EXPECT
(
WM_IME_SETCONTEXT_DEACTIVATE
);
SET_EXPECT
(
WM_IME_SETCONTEXT_ACTIVATE
);
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