From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/class.c | 12 ------------ dlls/win32u/imm.c | 11 +++++++++++ dlls/win32u/ntuser_private.h | 1 - 3 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/dlls/win32u/class.c b/dlls/win32u/class.c index fd6cd8b57a5..6d05ba38239 100644 --- a/dlls/win32u/class.c +++ b/dlls/win32u/class.c @@ -1029,18 +1029,6 @@ WORD get_class_word( HWND hwnd, INT offset ) return get_class_long_size( hwnd, offset, sizeof(WORD), TRUE ); }
-BOOL needs_ime_window( HWND hwnd ) -{ - static const WCHAR imeW[] = {'I','M','E',0}; - CLASS *class; - BOOL ret; - - if (!(class = get_class_ptr( hwnd, FALSE ))) return FALSE; - ret = !(class->style & CS_IME) && wcscmp( imeW, class->name ); - release_class_ptr( class ); - return ret; -} - static const struct builtin_class_descr desktop_builtin_class = { .name = "#32769", /* DESKTOP_CLASS_ATOM */ diff --git a/dlls/win32u/imm.c b/dlls/win32u/imm.c index cd94f56d678..c7eeaf49d5c 100644 --- a/dlls/win32u/imm.c +++ b/dlls/win32u/imm.c @@ -274,6 +274,17 @@ static struct imm_thread_data *get_imm_thread_data(void) return thread_info->imm_thread_data; }
+static BOOL needs_ime_window( HWND hwnd ) +{ + static const WCHAR imeW[] = {'I','M','E'}; + WCHAR nameW[MAX_ATOM_LEN + 1]; + UNICODE_STRING name = RTL_CONSTANT_STRING(nameW); + + if (NtUserGetClassLongW( hwnd, GCL_STYLE ) & CS_IME) return TRUE; + name.Length = NtUserGetClassName( hwnd, FALSE, &name ) * sizeof(WCHAR); + return name.Length != sizeof(imeW) || wcsnicmp( name.Buffer, imeW, ARRAY_SIZE(imeW) ); +} + BOOL register_imm_window( HWND hwnd ) { struct imm_thread_data *thread_data; diff --git a/dlls/win32u/ntuser_private.h b/dlls/win32u/ntuser_private.h index f5559c5ca4f..537cfb15ce1 100644 --- a/dlls/win32u/ntuser_private.h +++ b/dlls/win32u/ntuser_private.h @@ -180,7 +180,6 @@ WNDPROC get_winproc( WNDPROC proc, BOOL ansi ); void get_winproc_params( struct win_proc_params *params, BOOL fixup_ansi_dst ); struct dce *get_class_dce( struct tagCLASS *class ); struct dce *set_class_dce( struct tagCLASS *class, struct dce *dce ); -BOOL needs_ime_window( HWND hwnd ); extern atom_t wine_server_add_atom( void *req, UNICODE_STRING *str ); extern BOOL is_desktop_class( UNICODE_STRING *name ); extern BOOL is_message_class( UNICODE_STRING *name );