From: Akihiro Sagawa Subject: [2/3] imm32: Set the default IME window title and styles as in native. (rebased) Message-Id: <20160619220333.7A6B.375B48EC@gmail.com> Date: Sun, 19 Jun 2016 22:04:41 +0900 Signed-off-by: Akihiro Sagawa --- dlls/imm32/imm.c | 5 +++-- dlls/imm32/tests/imm32.c | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c index 27f9e22..d56e585 100644 --- a/dlls/imm32/imm.c +++ b/dlls/imm32/imm.c @@ -108,6 +108,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 = @@ -1639,8 +1640,8 @@ BOOL WINAPI __wine_register_window(HWND hwnd) LeaveCriticalSection(&threaddata_cs); /* FIXME: The default IME window is owned by hwnd and its owner is updeted every WM_IME_SETCONTEXT message (to maintain z-order?) */ - new = CreateWindowExW( WS_EX_TOOLWINDOW, - szwIME, NULL, WS_POPUP, + new = CreateWindowExW( 0, szwIME, szwDefaultIME, + WS_POPUP | WS_DISABLED | WS_CLIPSIBLINGS, 0, 0, 1, 1, HWND_MESSAGE, 0, 0, 0); /* thread_data is in the current thread so we can assume it's still valid */ EnterCriticalSection(&threaddata_cs); diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c index 2bf8484..cd8691c 100644 --- a/dlls/imm32/tests/imm32.c +++ b/dlls/imm32/tests/imm32.c @@ -859,6 +859,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, @@ -875,6 +877,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);