imm32: Set the default IME window title and styles as in native.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ab27cb48fc
commit
686369022d
|
@ -109,6 +109,7 @@ static const WCHAR szLayoutTextW[] = {'L','a','y','o','u','t',' ','T','e','x','t
|
|||
static const WCHAR szImeRegFmt[] = {'S','y','s','t','e','m','\\','C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\','C','o','n','t','r','o','l','\\','K','e','y','b','o','a','r','d',' ','L','a','y','o','u','t','s','\\','%','0','8','l','x',0};
|
||||
|
||||
static const WCHAR szwIME[] = {'I','M','E',0};
|
||||
static const WCHAR szwDefaultIME[] = {'D','e','f','a','u','l','t',' ','I','M','E',0};
|
||||
|
||||
static CRITICAL_SECTION threaddata_cs;
|
||||
static CRITICAL_SECTION_DEBUG critsect_debug =
|
||||
|
@ -1662,8 +1663,9 @@ BOOL WINAPI __wine_register_window(HWND hwnd)
|
|||
{
|
||||
/* Do not create the window inside of a critical section */
|
||||
LeaveCriticalSection(&threaddata_cs);
|
||||
new = CreateWindowExW( WS_EX_TOOLWINDOW,
|
||||
szwIME, NULL, WS_POPUP, 0, 0, 1, 1, 0, 0, 0, 0);
|
||||
new = CreateWindowExW( 0, szwIME, szwDefaultIME,
|
||||
WS_POPUP | WS_DISABLED | WS_CLIPSIBLINGS,
|
||||
0, 0, 1, 1, 0, 0, 0, 0);
|
||||
/* thread_data is in the current thread so we can assume it's still valid */
|
||||
EnterCriticalSection(&threaddata_cs);
|
||||
/* See if anyone beat us */
|
||||
|
|
|
@ -866,6 +866,8 @@ static void test_ImmDefaultHwnd(void)
|
|||
HWND def1, def3;
|
||||
HANDLE thread;
|
||||
HWND hwnd;
|
||||
char title[16];
|
||||
LONG style;
|
||||
|
||||
hwnd = CreateWindowExA(WS_EX_CLIENTEDGE, "EDIT", "Wine imm32.dll test",
|
||||
WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
|
@ -882,6 +884,13 @@ static void test_ImmDefaultHwnd(void)
|
|||
|
||||
def1 = ImmGetDefaultIMEWnd(hwnd);
|
||||
|
||||
GetWindowTextA(def1, title, sizeof(title));
|
||||
ok(!strcmp(title, "Default IME"), "got %s\n", title);
|
||||
style = GetWindowLongA(def1, GWL_STYLE);
|
||||
ok(style == (WS_DISABLED | WS_POPUP | WS_CLIPSIBLINGS), "got %08x\n", style);
|
||||
style = GetWindowLongA(def1, GWL_EXSTYLE);
|
||||
ok(style == 0, "got %08x\n", style);
|
||||
|
||||
imc2 = ImmCreateContext();
|
||||
ImmSetOpenStatus(imc2, TRUE);
|
||||
|
||||
|
|
|
@ -882,7 +882,7 @@ LRESULT WINAPI ImeWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
|||
{
|
||||
HWND uiwnd;
|
||||
|
||||
if (msg==WM_CREATE || msg==WM_NCCREATE)
|
||||
if (msg==WM_CREATE)
|
||||
return TRUE;
|
||||
|
||||
if (imm_get_ui_window && is_ime_ui_msg(msg))
|
||||
|
@ -899,7 +899,7 @@ LRESULT WINAPI ImeWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
|||
{
|
||||
HWND uiwnd;
|
||||
|
||||
if (msg==WM_CREATE || msg==WM_NCCREATE)
|
||||
if (msg==WM_CREATE)
|
||||
return TRUE;
|
||||
|
||||
if (imm_get_ui_window && is_ime_ui_msg(msg))
|
||||
|
|
Loading…
Reference in New Issue