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
0e763f72
Commit
0e763f72
authored
Jul 11, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32/tests: Add more tests for disabling IME.
parent
9c1ecf99
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
2 deletions
+52
-2
imm32.c
dlls/imm32/tests/imm32.c
+52
-2
No files found.
dlls/imm32/tests/imm32.c
View file @
0e763f72
...
...
@@ -2336,6 +2336,7 @@ static void test_com_initialization(void)
wnd
=
CreateWindowA
(
"static"
,
"static"
,
WS_POPUP
,
0
,
0
,
100
,
100
,
0
,
0
,
0
,
0
);
ok
(
wnd
!=
NULL
,
"CreateWindow failed
\n
"
);
test_apttype
(
-
1
);
ShowWindow
(
wnd
,
SW_SHOW
);
test_apttype
(
APTTYPE_MAINSTA
);
DestroyWindow
(
wnd
);
...
...
@@ -2368,15 +2369,47 @@ static DWORD WINAPI disable_ime_thread(void *arg)
return
0
;
}
static
DWORD
WINAPI
check_not_disabled_ime_thread
(
void
*
arg
)
{
HWND
def
,
hwnd
;
WaitForSingleObject
(
arg
,
INFINITE
);
hwnd
=
CreateWindowA
(
"static"
,
"static"
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
ok
(
hwnd
!=
NULL
,
"CreateWindow failed
\n
"
);
def
=
ImmGetDefaultIMEWnd
(
hwnd
);
todo_wine
ok
(
def
!=
NULL
,
"ImmGetDefaultIMEWnd returned %p
\n
"
,
def
);
return
0
;
}
static
DWORD
WINAPI
disable_ime_process
(
void
*
arg
)
{
BOOL
r
=
ImmDisableIME
(
-
1
);
ok
(
r
,
"ImmDisableIME failed
\n
"
);
return
0
;
}
static
void
test_ImmDisableIME
(
void
)
{
HANDLE
thread
;
HWND
def
;
HANDLE
thread
,
event
;
DWORD
tid
;
HWND
def
,
def2
;
BOOL
r
;
def
=
ImmGetDefaultIMEWnd
(
hwnd
);
ok
(
def
!=
NULL
,
"ImmGetDefaultIMEWnd(hwnd) returned NULL
\n
"
);
event
=
CreateEventW
(
NULL
,
TRUE
,
FALSE
,
FALSE
);
thread
=
CreateThread
(
NULL
,
0
,
check_not_disabled_ime_thread
,
event
,
0
,
&
tid
);
ok
(
thread
!=
NULL
,
"CreateThread failed
\n
"
);
r
=
ImmDisableIME
(
tid
);
todo_wine
ok
(
!
r
,
"ImmDisableIME(tid) succeeded
\n
"
);
SetEvent
(
event
);
WaitForSingleObject
(
thread
,
INFINITE
);
CloseHandle
(
thread
);
CloseHandle
(
event
);
thread
=
CreateThread
(
NULL
,
0
,
disable_ime_thread
,
0
,
0
,
NULL
);
ok
(
thread
!=
NULL
,
"CreateThread failed
\n
"
);
WaitForSingleObject
(
thread
,
INFINITE
);
...
...
@@ -2387,6 +2420,23 @@ static void test_ImmDisableIME(void)
WaitForSingleObject
(
thread
,
INFINITE
);
CloseHandle
(
thread
);
msg_spy_pump_msg_queue
();
thread
=
CreateThread
(
NULL
,
0
,
disable_ime_process
,
0
,
0
,
NULL
);
ok
(
thread
!=
NULL
,
"CreateThread failed
\n
"
);
WaitForSingleObject
(
thread
,
INFINITE
);
CloseHandle
(
thread
);
ok
(
IsWindow
(
def
),
"not a window
\n
"
);
def2
=
ImmGetDefaultIMEWnd
(
hwnd
);
todo_wine
ok
(
def2
==
def
,
"ImmGetDefaultIMEWnd(hwnd) returned %p
\n
"
,
def2
);
ok
(
IsWindow
(
def
),
"not a window
\n
"
);
msg_spy_pump_msg_queue
();
todo_wine
ok
(
!
IsWindow
(
def
),
"window is still valid
\n
"
);
def
=
ImmGetDefaultIMEWnd
(
hwnd
);
ok
(
!
def
,
"ImmGetDefaultIMEWnd(hwnd) returned %p
\n
"
,
def
);
r
=
ImmDisableIME
(
-
1
);
ok
(
r
,
"ImmDisableIME(-1) failed
\n
"
);
def
=
ImmGetDefaultIMEWnd
(
hwnd
);
...
...
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