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
b9feebf7
Commit
b9feebf7
authored
Jul 05, 2023
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Jul 19, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Add Korean IME specific test sequences.
Windows with Korean locale has a different IME message sequence. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53890
parent
6596f85e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
3 deletions
+37
-3
msg.c
dlls/user32/tests/msg.c
+37
-3
No files found.
dlls/user32/tests/msg.c
View file @
b9feebf7
...
...
@@ -12821,6 +12821,21 @@ static const struct message edit_wm_ime_composition_seq[] =
{
0
}
};
static
const
struct
message
edit_wm_ime_composition_korean_seq
[]
=
{
{
WM_IME_ENDCOMPOSITION
,
sent
},
{
WM_IME_COMPOSITION
,
sent
|
wparam
,
'W'
},
{
WM_IME_CHAR
,
sent
|
wparam
|
defwinproc
,
'W'
},
{
WM_IME_CHAR
,
sent
|
wparam
|
defwinproc
,
'i'
},
{
WM_IME_CHAR
,
sent
|
wparam
|
defwinproc
,
'n'
},
{
WM_IME_CHAR
,
sent
|
wparam
|
defwinproc
,
'e'
},
{
WM_CHAR
,
sent
|
wparam
,
'W'
},
{
WM_CHAR
,
sent
|
wparam
,
'i'
},
{
WM_CHAR
,
sent
|
wparam
,
'n'
},
{
WM_CHAR
,
sent
|
wparam
,
'e'
},
{
0
}
};
static
const
struct
message
edit_wm_ime_char_seq
[]
=
{
{
WM_IME_CHAR
,
sent
|
wparam
,
'0'
},
...
...
@@ -12836,6 +12851,13 @@ static const struct message edit_eimes_getcompstratonce_seq[] =
{
0
}
};
static
const
struct
message
edit_eimes_getcompstratonce_korean_seq
[]
=
{
{
WM_IME_ENDCOMPOSITION
,
sent
},
{
WM_IME_COMPOSITION
,
sent
|
wparam
,
'W'
},
{
0
}
};
static
LRESULT
CALLBACK
edit_ime_subclass_proc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
WNDPROC
oldproc
=
(
WNDPROC
)
GetWindowLongPtrA
(
hwnd
,
GWLP_USERDATA
);
...
...
@@ -12881,13 +12903,17 @@ static LRESULT CALLBACK edit_ime_subclass_proc(HWND hwnd, UINT message, WPARAM w
static
DWORD
WINAPI
test_edit_ime_messages
(
void
*
unused_arg
)
{
static
const
HKL
korean_hkl
=
(
HKL
)
0x04120412
;
WNDPROC
old_proc
;
LRESULT
lr
;
HIMC
himc
;
HWND
hwnd
;
BOOL
ret
;
HKL
hkl
;
MSG
msg
;
hkl
=
GetKeyboardLayout
(
0
);
hwnd
=
CreateWindowA
(
WC_EDITA
,
"Test"
,
WS_POPUP
|
WS_VISIBLE
,
10
,
10
,
300
,
300
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
hwnd
!=
NULL
,
"CreateWindowA failed.
\n
"
);
...
...
@@ -12965,7 +12991,11 @@ static DWORD WINAPI test_edit_ime_messages(void *unused_arg)
/* Note that the following message loop is necessary to get the WM_CHAR messages because they
* are posted. Same for the later message loops in this function. */
while
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessageA
(
&
msg
);
ok_sequence
(
edit_wm_ime_composition_seq
,
"WM_IME_COMPOSITION"
,
TRUE
);
if
(
hkl
==
korean_hkl
)
ok_sequence
(
edit_wm_ime_composition_korean_seq
,
"korean WM_IME_COMPOSITION"
,
TRUE
);
else
ok_sequence
(
edit_wm_ime_composition_seq
,
"WM_IME_COMPOSITION"
,
TRUE
);
/* Test that WM_IME_CHAR is passed to DefWindowProc() to get WM_CHAR */
flush_sequence
();
...
...
@@ -12985,8 +13015,12 @@ static DWORD WINAPI test_edit_ime_messages(void *unused_arg)
ret
=
ImmNotifyIME
(
himc
,
NI_COMPOSITIONSTR
,
CPS_COMPLETE
,
0
);
ok
(
ret
,
"ImmNotifyIME failed.
\n
"
);
while
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessageA
(
&
msg
);
ok_sequence
(
edit_eimes_getcompstratonce_seq
,
"WM_IME_COMPOSITION with EIMES_GETCOMPSTRATONCE"
,
TRUE
);
if
(
hkl
==
korean_hkl
)
ok_sequence
(
edit_eimes_getcompstratonce_korean_seq
,
"korean WM_IME_COMPOSITION with EIMES_GETCOMPSTRATONCE"
,
TRUE
);
else
ok_sequence
(
edit_eimes_getcompstratonce_seq
,
"WM_IME_COMPOSITION with EIMES_GETCOMPSTRATONCE"
,
TRUE
);
/* Test that WM_IME_CHAR is passed to DefWindowProc() to get WM_CHAR with EIMES_GETCOMPSTRATONCE */
flush_sequence
();
...
...
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