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
64e64d65
Commit
64e64d65
authored
Apr 30, 2008
by
ByeongSik Jeon
Committed by
Alexandre Julliard
May 01, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Post the WM_KEY{DOWN|UP} message whenWM_IME_KEY{DOWN|UP} message is generated by IME.
parent
18e704f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
2 deletions
+81
-2
defwnd.c
dlls/user32/defwnd.c
+10
-2
msg.c
dlls/user32/tests/msg.c
+71
-0
No files found.
dlls/user32/defwnd.c
View file @
64e64d65
...
...
@@ -843,11 +843,11 @@ LRESULT WINAPI DefWindowProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
break
;
case
WM_IME_KEYDOWN
:
result
=
Send
MessageA
(
hwnd
,
WM_KEYDOWN
,
wParam
,
lParam
);
result
=
Post
MessageA
(
hwnd
,
WM_KEYDOWN
,
wParam
,
lParam
);
break
;
case
WM_IME_KEYUP
:
result
=
Send
MessageA
(
hwnd
,
WM_KEYUP
,
wParam
,
lParam
);
result
=
Post
MessageA
(
hwnd
,
WM_KEYUP
,
wParam
,
lParam
);
break
;
case
WM_IME_STARTCOMPOSITION
:
...
...
@@ -993,6 +993,14 @@ LRESULT WINAPI DefWindowProcW(
PostMessageW
(
hwnd
,
WM_CHAR
,
wParam
,
lParam
);
break
;
case
WM_IME_KEYDOWN
:
result
=
PostMessageW
(
hwnd
,
WM_KEYDOWN
,
wParam
,
lParam
);
break
;
case
WM_IME_KEYUP
:
result
=
PostMessageW
(
hwnd
,
WM_KEYUP
,
wParam
,
lParam
);
break
;
case
WM_IME_SETCONTEXT
:
{
HWND
hwndIME
;
...
...
dlls/user32/tests/msg.c
View file @
64e64d65
...
...
@@ -5067,6 +5067,76 @@ static void test_combobox_messages(void)
DestroyWindow
(
parent
);
}
/****************** WM_IME_KEYDOWN message test *******************/
static
const
struct
message
WmImeKeydownMsgSeq_0
[]
=
{
{
WM_IME_KEYDOWN
,
wparam
,
VK_RETURN
},
{
WM_CHAR
,
wparam
,
'A'
},
{
0
}
};
static
const
struct
message
WmImeKeydownMsgSeq_1
[]
=
{
{
WM_KEYDOWN
,
wparam
,
VK_RETURN
},
{
WM_CHAR
,
wparam
,
VK_RETURN
},
{
0
}
};
static
LRESULT
WINAPI
wmime_keydown_procA
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
struct
message
msg
;
trace
(
"wmime_keydown_procA: %p, %04x, %08lx, %08lx
\n
"
,
hwnd
,
message
,
wParam
,
lParam
);
msg
.
message
=
message
;
msg
.
flags
=
wparam
|
lparam
;
msg
.
wParam
=
wParam
;
msg
.
lParam
=
lParam
;
add_message
(
&
msg
);
return
DefWindowProcA
(
hwnd
,
message
,
wParam
,
lParam
);
}
static
void
register_wmime_keydown_class
(
void
)
{
WNDCLASSA
cls
;
ZeroMemory
(
&
cls
,
sizeof
(
WNDCLASSA
));
cls
.
lpfnWndProc
=
wmime_keydown_procA
;
cls
.
hInstance
=
GetModuleHandleA
(
0
);
cls
.
lpszClassName
=
"wmime_keydown_class"
;
if
(
!
RegisterClassA
(
&
cls
))
assert
(
0
);
}
void
test_wmime_keydown_message
(
void
)
{
HWND
hwnd
;
MSG
msg
;
trace
(
"Message sequences by WM_IME_KEYDOWN
\n
"
);
register_wmime_keydown_class
();
hwnd
=
CreateWindowExA
(
0
,
"wmime_keydown_class"
,
NULL
,
WS_OVERLAPPEDWINDOW
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
300
,
300
,
0
,
NULL
,
NULL
,
0
);
flush_events
();
flush_sequence
();
SendMessage
(
hwnd
,
WM_IME_KEYDOWN
,
VK_RETURN
,
0x1c0001
);
SendMessage
(
hwnd
,
WM_CHAR
,
'A'
,
1
);
ok_sequence
(
WmImeKeydownMsgSeq_0
,
"WM_IME_KEYDOWN 0"
,
FALSE
);
while
(
PeekMessage
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
)
)
{
TranslateMessage
(
&
msg
);
DispatchMessage
(
&
msg
);
}
ok_sequence
(
WmImeKeydownMsgSeq_1
,
"WM_IME_KEYDOWN 1"
,
FALSE
);
DestroyWindow
(
hwnd
);
}
/************* painting message test ********************/
void
dump_region
(
HRGN
hrgn
)
...
...
@@ -10353,6 +10423,7 @@ START_TEST(msg)
test_static_messages
();
test_listbox_messages
();
test_combobox_messages
();
test_wmime_keydown_message
();
test_paint_messages
();
test_interthread_messages
();
test_message_conversion
();
...
...
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