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
53ae92fa
Commit
53ae92fa
authored
Apr 17, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Apr 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32/tests: Check ImmSetActiveContext effect on INPUTCONTEXT hWnd member.
parent
c8d56037
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
imm32.c
dlls/imm32/tests/imm32.c
+38
-0
No files found.
dlls/imm32/tests/imm32.c
View file @
53ae92fa
...
...
@@ -5240,6 +5240,18 @@ static void test_ImmSetActiveContext(void)
},
{
0
},
};
struct
ime_call
deactivate_2_seq
[]
=
{
{
.
hkl
=
expect_ime
,
.
himc
=
0
/*himc*/
,
.
func
=
IME_SET_ACTIVE_CONTEXT
,
.
set_active_context
=
{.
flag
=
0
}
},
{
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
.
func
=
MSG_IME_UI
,
.
message
=
{.
msg
=
WM_IME_SETCONTEXT
,
.
wparam
=
0
,
.
lparam
=
ISC_SHOWUIALL
}
},
{
0
},
};
struct
ime_call
activate_1_seq
[]
=
{
{
...
...
@@ -5254,6 +5266,7 @@ static void test_ImmSetActiveContext(void)
};
HKL
hkl
;
struct
ime_windows
ime_windows
=
{
0
};
INPUTCONTEXT
*
ctx
;
HIMC
himc
;
ime_info
.
fdwProperty
=
IME_PROP_END_UNLOAD
|
IME_PROP_UNICODE
;
...
...
@@ -5287,6 +5300,10 @@ static void test_ImmSetActiveContext(void)
himc
=
ImmCreateContext
();
ok_ne
(
NULL
,
himc
,
HIMC
,
"%p"
);
ctx
=
ImmLockIMC
(
himc
);
ok_ne
(
NULL
,
ctx
,
INPUTCONTEXT
*
,
"%p"
);
ok_eq
(
0
,
ctx
->
hWnd
,
HWND
,
"%p"
);
ok_ret
(
1
,
ImmSetActiveContext
(
hwnd
,
himc
,
FALSE
)
);
deactivate_1_seq
[
3
].
himc
=
himc
;
deactivate_1_seq
[
4
].
himc
=
himc
;
...
...
@@ -5295,14 +5312,35 @@ static void test_ImmSetActiveContext(void)
activate_1_seq
[
0
].
himc
=
himc
;
ok_seq
(
activate_1_seq
);
ctx
->
hWnd
=
(
HWND
)
0xdeadbeef
;
ok_ret
(
1
,
ImmSetActiveContext
(
hwnd
,
himc
,
FALSE
)
);
todo_wine
ok_eq
(
(
HWND
)
0xdeadbeef
,
ctx
->
hWnd
,
HWND
,
"%p"
);
deactivate_2_seq
[
0
].
himc
=
himc
;
ok_seq
(
deactivate_2_seq
);
ctx
->
hWnd
=
0
;
ok_ret
(
1
,
ImmSetActiveContext
(
hwnd
,
himc
,
TRUE
)
);
ok_eq
(
hwnd
,
ctx
->
hWnd
,
HWND
,
"%p"
);
activate_1_seq
[
0
].
himc
=
himc
;
ok_seq
(
activate_1_seq
);
ok_eq
(
default_himc
,
(
HIMC
)
GetWindowLongPtrW
(
ime_windows
.
ime_ui_hwnd
,
IMMGWL_IMC
),
HIMC
,
"%p"
);
ok_ret
(
1
,
ImmSetActiveContext
(
hwnd
,
himc
,
TRUE
)
);
ok_ret
(
0
,
IsWindowVisible
(
ime_windows
.
ime_ui_hwnd
)
);
ok_eq
(
default_himc
,
(
HIMC
)
GetWindowLongPtrW
(
ime_windows
.
ime_ui_hwnd
,
IMMGWL_IMC
),
HIMC
,
"%p"
);
ctx
->
hWnd
=
0
;
ok_eq
(
default_himc
,
ImmAssociateContext
(
hwnd
,
himc
),
HIMC
,
"%p"
);
todo_wine
ok_eq
(
himc
,
(
HIMC
)
GetWindowLongPtrW
(
ime_windows
.
ime_ui_hwnd
,
IMMGWL_IMC
),
HIMC
,
"%p"
);
ok_ret
(
0
,
IsWindowVisible
(
ime_windows
.
ime_ui_hwnd
)
);
ok_eq
(
hwnd
,
ctx
->
hWnd
,
HWND
,
"%p"
);
ctx
->
hWnd
=
(
HWND
)
0xdeadbeef
;
ok_eq
(
himc
,
ImmGetContext
(
hwnd
),
HIMC
,
"%p"
);
todo_wine
ok_eq
(
(
HWND
)
0xdeadbeef
,
ctx
->
hWnd
,
HWND
,
"%p"
);
ok_ret
(
1
,
ImmReleaseContext
(
hwnd
,
himc
)
);
ok_ret
(
1
,
ImmUnlockIMC
(
himc
)
);
ok_ret
(
1
,
ImmDestroyContext
(
himc
)
);
ok_ret
(
1
,
ImmActivateLayout
(
default_hkl
)
);
...
...
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