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
7673d67c
Commit
7673d67c
authored
Jun 25, 2011
by
André Hentschel
Committed by
Alexandre Julliard
Jul 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32: Test and fix ImmIsUIMessageA/W.
parent
9916931d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
83 additions
and
30 deletions
+83
-30
imm.c
dlls/imm32/imm.c
+32
-30
imm32.c
dlls/imm32/tests/imm32.c
+51
-0
No files found.
dlls/imm32/imm.c
View file @
7673d67c
...
...
@@ -1885,21 +1885,21 @@ BOOL WINAPI ImmIsUIMessageA(
TRACE
(
"(%p, %x, %ld, %ld)
\n
"
,
hWndIME
,
msg
,
wParam
,
lParam
);
if
((
msg
>=
WM_IME_STARTCOMPOSITION
&&
msg
<=
WM_IME_KEYLAST
)
||
(
msg
>=
WM_IME_SETCONTEXT
&&
msg
<=
WM_IME_KEYUP
)
||
(
msg
==
WM_MSIME_SERVICE
)
||
(
msg
==
WM_MSIME_RECONVERTOPTIONS
)
||
(
msg
==
WM_MSIME_MOUSE
)
||
(
msg
==
WM_MSIME_RECONVERTREQUES
T
)
||
(
msg
==
WM_MSIME_RECONVERT
)
||
(
msg
==
WM_MSIME_QUERYPOSITION
)
||
(
msg
==
WM_MSIME_DOCUMENTFEED
))
{
if
(
!
IMM_GetThreadData
()
->
hwndDefault
)
ImmGetDefaultIMEWnd
(
NULL
);
if
(
hWndIME
==
NULL
)
PostMessageA
(
IMM_GetThreadData
()
->
hwndDefault
,
msg
,
wParam
,
lParam
);
(
msg
==
WM_IME_SETCONTEXT
)
||
(
msg
==
WM_IME_NOTIFY
)
||
(
msg
==
WM_IME_COMPOSITIONFULL
)
||
(
msg
==
WM_IME_SELECT
)
||
(
msg
==
WM_IME_SELEC
T
)
||
(
msg
==
0x287
/* FIXME: WM_IME_SYSTEM */
)
||
(
msg
==
WM_MSIME_RECONVERTOPTIONS
)
||
(
msg
==
WM_MSIME_MOUSE
)
||
(
msg
==
WM_MSIME_RECONVERTREQUEST
)
||
(
msg
==
WM_MSIME_RECONVERT
)
||
(
msg
==
WM_MSIME_QUERYPOSITION
)
||
(
msg
==
WM_MSIME_DOCUMENTFEED
))
{
if
(
hWndIME
)
SendMessageA
(
hWndIME
,
msg
,
wParam
,
lParam
);
rc
=
TRUE
;
}
...
...
@@ -1913,22 +1913,24 @@ BOOL WINAPI ImmIsUIMessageW(
HWND
hWndIME
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
BOOL
rc
=
FALSE
;
TRACE
(
"(%p, %d, %ld, %ld):
\n
"
,
hWndIME
,
msg
,
wParam
,
lParam
);
TRACE
(
"(%p, %x, %ld, %ld)
\n
"
,
hWndIME
,
msg
,
wParam
,
lParam
);
if
((
msg
>=
WM_IME_STARTCOMPOSITION
&&
msg
<=
WM_IME_KEYLAST
)
||
(
msg
>=
WM_IME_SETCONTEXT
&&
msg
<=
WM_IME_KEYUP
)
||
(
msg
==
WM_MSIME_SERVICE
)
||
(
msg
==
WM_MSIME_RECONVERTOPTIONS
)
||
(
msg
==
WM_MSIME_MOUSE
)
||
(
msg
==
WM_MSIME_RECONVERTREQUEST
)
||
(
msg
==
WM_MSIME_RECONVERT
)
||
(
msg
==
WM_MSIME_QUERYPOSITION
)
||
(
msg
==
WM_MSIME_DOCUMENTFEED
))
{
if
(
!
IMM_GetThreadData
()
->
hwndDefault
)
ImmGetDefaultIMEWnd
(
NULL
);
if
(
hWndIME
==
NULL
)
PostMessageW
(
IMM_GetThreadData
()
->
hwndDefault
,
msg
,
wParam
,
lParam
);
(
msg
==
WM_IME_SETCONTEXT
)
||
(
msg
==
WM_IME_NOTIFY
)
||
(
msg
==
WM_IME_COMPOSITIONFULL
)
||
(
msg
==
WM_IME_SELECT
)
||
(
msg
==
WM_IME_SELECT
)
||
(
msg
==
0x287
/* FIXME: WM_IME_SYSTEM */
)
||
(
msg
==
WM_MSIME_RECONVERTOPTIONS
)
||
(
msg
==
WM_MSIME_MOUSE
)
||
(
msg
==
WM_MSIME_RECONVERTREQUEST
)
||
(
msg
==
WM_MSIME_RECONVERT
)
||
(
msg
==
WM_MSIME_QUERYPOSITION
)
||
(
msg
==
WM_MSIME_DOCUMENTFEED
))
{
if
(
hWndIME
)
SendMessageW
(
hWndIME
,
msg
,
wParam
,
lParam
);
rc
=
TRUE
;
}
...
...
dlls/imm32/tests/imm32.c
View file @
7673d67c
...
...
@@ -28,6 +28,7 @@
#define NUMELEMS(array) (sizeof((array))/sizeof((array)[0]))
static
BOOL
(
WINAPI
*
pImmAssociateContextEx
)(
HWND
,
HIMC
,
DWORD
);
static
BOOL
(
WINAPI
*
pImmIsUIMessageA
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
/*
* msgspy - record and analyse message traces sent to a certain window
...
...
@@ -156,6 +157,7 @@ static BOOL init(void) {
hmod
=
GetModuleHandleA
(
"imm32.dll"
);
pImmAssociateContextEx
=
(
void
*
)
GetProcAddress
(
hmod
,
"ImmAssociateContextEx"
);
pImmIsUIMessageA
=
(
void
*
)
GetProcAddress
(
hmod
,
"ImmIsUIMessageA"
);
wc
.
cbSize
=
sizeof
(
WNDCLASSEX
);
wc
.
style
=
0
;
...
...
@@ -507,6 +509,54 @@ static void test_ImmThreads(void)
todo_wine
ok
(
himc
==
NULL
,
"Should not be able to get himc from other process window
\n
"
);
}
static
void
test_ImmIsUIMessage
(
void
)
{
struct
test
{
UINT
msg
;
BOOL
ret
;
};
static
const
struct
test
tests
[]
=
{
{
WM_MOUSEMOVE
,
FALSE
},
{
WM_IME_STARTCOMPOSITION
,
TRUE
},
{
WM_IME_ENDCOMPOSITION
,
TRUE
},
{
WM_IME_COMPOSITION
,
TRUE
},
{
WM_IME_SETCONTEXT
,
TRUE
},
{
WM_IME_NOTIFY
,
TRUE
},
{
WM_IME_CONTROL
,
FALSE
},
{
WM_IME_COMPOSITIONFULL
,
TRUE
},
{
WM_IME_SELECT
,
TRUE
},
{
WM_IME_CHAR
,
FALSE
},
{
0x287
/* FIXME */
,
TRUE
},
{
WM_IME_REQUEST
,
FALSE
},
{
WM_IME_KEYDOWN
,
FALSE
},
{
WM_IME_KEYUP
,
FALSE
},
{
0
,
FALSE
}
/* mark the end */
};
const
struct
test
*
test
;
BOOL
ret
;
if
(
!
pImmIsUIMessageA
)
return
;
for
(
test
=
tests
;
test
->
msg
;
test
++
)
{
msg_spy_flush_msgs
();
ret
=
pImmIsUIMessageA
(
NULL
,
test
->
msg
,
0
,
0
);
ok
(
ret
==
test
->
ret
,
"ImmIsUIMessageA returned %x for %x
\n
"
,
ret
,
test
->
msg
);
ok
(
!
msg_spy_find_msg
(
test
->
msg
),
"Windows does not send 0x%x for NULL hwnd
\n
"
,
test
->
msg
);
ret
=
pImmIsUIMessageA
(
hwnd
,
test
->
msg
,
0
,
0
);
ok
(
ret
==
test
->
ret
,
"ImmIsUIMessageA returned %x for %x
\n
"
,
ret
,
test
->
msg
);
if
(
ret
)
ok
(
msg_spy_find_msg
(
test
->
msg
)
!=
NULL
,
"Windows does send 0x%x
\n
"
,
test
->
msg
);
else
ok
(
!
msg_spy_find_msg
(
test
->
msg
),
"Windows does not send 0x%x
\n
"
,
test
->
msg
);
}
}
START_TEST
(
imm32
)
{
if
(
init
())
{
...
...
@@ -516,6 +566,7 @@ START_TEST(imm32) {
test_ImmIME
();
test_ImmAssociateContextEx
();
test_ImmThreads
();
test_ImmIsUIMessage
();
}
cleanup
();
}
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