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
64c772dc
Commit
64c772dc
authored
Jan 28, 2016
by
Aric Stewart
Committed by
Alexandre Julliard
Feb 01, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32: Messages from ImmGenerateMessage are sent not posted.
Signed-off-by:
Aric Stewart
<
aric@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
faf59e5f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
2 deletions
+79
-2
imm.c
dlls/imm32/imm.c
+11
-1
imm32.c
dlls/imm32/tests/imm32.c
+68
-1
No files found.
dlls/imm32/imm.c
View file @
64c772dc
...
...
@@ -439,6 +439,16 @@ static void ImmInternalPostIMEMessage(InputContextData *data, UINT msg, WPARAM w
PostMessageW
(
target
,
msg
,
wParam
,
lParam
);
}
/* for sending messages as the IME */
static
void
ImmInternalSendIMEMessage
(
InputContextData
*
data
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
HWND
target
=
GetFocus
();
if
(
!
target
)
SendMessageW
(
data
->
IMC
.
hWnd
,
msg
,
wParam
,
lParam
);
else
SendMessageW
(
target
,
msg
,
wParam
,
lParam
);
}
static
LRESULT
ImmInternalSendIMENotify
(
InputContextData
*
data
,
WPARAM
notify
,
LPARAM
lParam
)
{
HWND
target
;
...
...
@@ -2887,7 +2897,7 @@ BOOL WINAPI ImmGenerateMessage(HIMC hIMC)
lpTransMsg
=
ImmLockIMCC
(
data
->
IMC
.
hMsgBuf
);
for
(
i
=
0
;
i
<
data
->
IMC
.
dwNumMsgBuf
;
i
++
)
ImmInternal
Post
IMEMessage
(
data
,
lpTransMsg
[
i
].
message
,
lpTransMsg
[
i
].
wParam
,
lpTransMsg
[
i
].
lParam
);
ImmInternal
Send
IMEMessage
(
data
,
lpTransMsg
[
i
].
message
,
lpTransMsg
[
i
].
wParam
,
lpTransMsg
[
i
].
lParam
);
ImmUnlockIMCC
(
data
->
IMC
.
hMsgBuf
);
...
...
dlls/imm32/tests/imm32.c
View file @
64c772dc
...
...
@@ -44,7 +44,7 @@ static struct _msg_spy {
HWND
hwnd
;
HHOOK
get_msg_hook
;
HHOOK
call_wnd_proc_hook
;
imm_msgs
msgs
[
32
];
imm_msgs
msgs
[
64
];
unsigned
int
i_msg
;
}
msg_spy
;
...
...
@@ -59,6 +59,12 @@ typedef struct
}
u
;
}
TEST_INPUT
;
typedef
struct
_tagTRANSMSG
{
UINT
message
;
WPARAM
wParam
;
LPARAM
lParam
;
}
TRANSMSG
,
*
LPTRANSMSG
;
static
UINT
(
WINAPI
*
pSendInput
)
(
UINT
,
INPUT
*
,
size_t
);
static
LRESULT
CALLBACK
get_msg_filter
(
int
nCode
,
WPARAM
wParam
,
LPARAM
lParam
)
...
...
@@ -1015,6 +1021,9 @@ static void test_ImmMessages(void)
HIMC
imc
;
UINT
idx
=
0
;
LPINPUTCONTEXT
lpIMC
;
LPTRANSMSG
lpTransMsg
;
HWND
hwnd
=
CreateWindowExA
(
WS_EX_CLIENTEDGE
,
"EDIT"
,
"Wine imm32.dll test"
,
WS_OVERLAPPEDWINDOW
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
240
,
120
,
NULL
,
NULL
,
GetModuleHandleA
(
NULL
),
NULL
);
...
...
@@ -1032,6 +1041,64 @@ static void test_ImmMessages(void)
if
(
msg
)
ok
(
!
msg
->
post
,
"Message should not be posted
\n
"
);
}
while
(
msg
);
msg_spy_flush_msgs
();
lpIMC
=
ImmLockIMC
(
imc
);
lpIMC
->
hMsgBuf
=
ImmReSizeIMCC
(
lpIMC
->
hMsgBuf
,
(
lpIMC
->
dwNumMsgBuf
+
1
)
*
sizeof
(
TRANSMSG
));
lpTransMsg
=
ImmLockIMCC
(
lpIMC
->
hMsgBuf
);
lpTransMsg
+=
lpIMC
->
dwNumMsgBuf
;
lpTransMsg
->
message
=
WM_IME_STARTCOMPOSITION
;
lpTransMsg
->
wParam
=
0
;
lpTransMsg
->
lParam
=
0
;
ImmUnlockIMCC
(
lpIMC
->
hMsgBuf
);
lpIMC
->
dwNumMsgBuf
++
;
ImmUnlockIMC
(
imc
);
ImmGenerateMessage
(
imc
);
idx
=
0
;
do
{
msg
=
msg_spy_find_next_msg
(
WM_IME_STARTCOMPOSITION
,
&
idx
);
if
(
msg
)
ok
(
!
msg
->
post
,
"Message should not be posted
\n
"
);
}
while
(
msg
);
msg_spy_flush_msgs
();
lpIMC
=
ImmLockIMC
(
imc
);
lpIMC
->
hMsgBuf
=
ImmReSizeIMCC
(
lpIMC
->
hMsgBuf
,
(
lpIMC
->
dwNumMsgBuf
+
1
)
*
sizeof
(
TRANSMSG
));
lpTransMsg
=
ImmLockIMCC
(
lpIMC
->
hMsgBuf
);
lpTransMsg
+=
lpIMC
->
dwNumMsgBuf
;
lpTransMsg
->
message
=
WM_IME_COMPOSITION
;
lpTransMsg
->
wParam
=
0
;
lpTransMsg
->
lParam
=
0
;
ImmUnlockIMCC
(
lpIMC
->
hMsgBuf
);
lpIMC
->
dwNumMsgBuf
++
;
ImmUnlockIMC
(
imc
);
ImmGenerateMessage
(
imc
);
idx
=
0
;
do
{
msg
=
msg_spy_find_next_msg
(
WM_IME_COMPOSITION
,
&
idx
);
if
(
msg
)
ok
(
!
msg
->
post
,
"Message should not be posted
\n
"
);
}
while
(
msg
);
msg_spy_flush_msgs
();
lpIMC
=
ImmLockIMC
(
imc
);
lpIMC
->
hMsgBuf
=
ImmReSizeIMCC
(
lpIMC
->
hMsgBuf
,
(
lpIMC
->
dwNumMsgBuf
+
1
)
*
sizeof
(
TRANSMSG
));
lpTransMsg
=
ImmLockIMCC
(
lpIMC
->
hMsgBuf
);
lpTransMsg
+=
lpIMC
->
dwNumMsgBuf
;
lpTransMsg
->
message
=
WM_IME_ENDCOMPOSITION
;
lpTransMsg
->
wParam
=
0
;
lpTransMsg
->
lParam
=
0
;
ImmUnlockIMCC
(
lpIMC
->
hMsgBuf
);
lpIMC
->
dwNumMsgBuf
++
;
ImmUnlockIMC
(
imc
);
ImmGenerateMessage
(
imc
);
idx
=
0
;
do
{
msg
=
msg_spy_find_next_msg
(
WM_IME_ENDCOMPOSITION
,
&
idx
);
if
(
msg
)
ok
(
!
msg
->
post
,
"Message should not be posted
\n
"
);
}
while
(
msg
);
msg_spy_flush_msgs
();
ImmSetOpenStatus
(
imc
,
FALSE
);
ImmReleaseContext
(
hwnd
,
imc
);
DestroyWindow
(
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