win32u: Avoid calling RtlInitUnicodeString on a static constant.

This commit is contained in:
Alex Henrie 2023-02-11 12:52:28 -07:00 committed by Alexandre Julliard
parent 3549ae75dd
commit 33ddf019f7

View file

@ -277,12 +277,11 @@ BOOL register_imm_window( HWND hwnd )
/* Create default IME window */
if (!thread_data->window_cnt++)
{
UNICODE_STRING class_name, name;
static const WCHAR imeW[] = {'I','M','E',0};
static const WCHAR default_imeW[] = {'D','e','f','a','u','l','t',' ','I','M','E',0};
UNICODE_STRING class_name = RTL_CONSTANT_STRING( imeW );
UNICODE_STRING name = RTL_CONSTANT_STRING( default_imeW );
RtlInitUnicodeString( &class_name, imeW );
RtlInitUnicodeString( &name, default_imeW );
thread_data->default_hwnd = NtUserCreateWindowEx( 0, &class_name, &class_name, &name,
WS_POPUP | WS_DISABLED | WS_CLIPSIBLINGS,
0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, FALSE );