Commit 97cb5b9c authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winex11: Remove duplicated foreign window class string constant.

parent 749574a2
...@@ -2171,7 +2171,6 @@ static struct x11drv_win_data *X11DRV_create_win_data( HWND hwnd, const RECT *wi ...@@ -2171,7 +2171,6 @@ static struct x11drv_win_data *X11DRV_create_win_data( HWND hwnd, const RECT *wi
*/ */
HWND create_foreign_window( Display *display, Window xwin ) HWND create_foreign_window( Display *display, Window xwin )
{ {
static const WCHAR classW[] = {'_','_','w','i','n','e','_','x','1','1','_','f','o','r','e','i','g','n','_','w','i','n','d','o','w',0};
static BOOL class_registered; static BOOL class_registered;
struct x11drv_win_data *data; struct x11drv_win_data *data;
HWND hwnd, parent; HWND hwnd, parent;
...@@ -2181,7 +2180,7 @@ HWND create_foreign_window( Display *display, Window xwin ) ...@@ -2181,7 +2180,7 @@ HWND create_foreign_window( Display *display, Window xwin )
unsigned int nchildren; unsigned int nchildren;
XWindowAttributes attr; XWindowAttributes attr;
UINT style = WS_CLIPCHILDREN; UINT style = WS_CLIPCHILDREN;
UNICODE_STRING class_name = RTL_CONSTANT_STRING( classW ); UNICODE_STRING class_name = RTL_CONSTANT_STRING( foreign_window_prop );
if (!class_registered) if (!class_registered)
{ {
...@@ -2191,7 +2190,7 @@ HWND create_foreign_window( Display *display, Window xwin ) ...@@ -2191,7 +2190,7 @@ HWND create_foreign_window( Display *display, Window xwin )
memset( &class, 0, sizeof(class) ); memset( &class, 0, sizeof(class) );
class.cbSize = sizeof(class); class.cbSize = sizeof(class);
class.lpfnWndProc = client_foreign_window_proc; class.lpfnWndProc = client_foreign_window_proc;
class.lpszClassName = classW; class.lpszClassName = foreign_window_prop;
if (!NtUserRegisterClassExWOW( &class, &class_name, &version, NULL, 0, 0, NULL ) && if (!NtUserRegisterClassExWOW( &class, &class_name, &version, NULL, 0, 0, NULL ) &&
RtlGetLastWin32Error() != ERROR_CLASS_ALREADY_EXISTS) RtlGetLastWin32Error() != ERROR_CLASS_ALREADY_EXISTS)
{ {
...@@ -2227,7 +2226,6 @@ HWND create_foreign_window( Display *display, Window xwin ) ...@@ -2227,7 +2226,6 @@ HWND create_foreign_window( Display *display, Window xwin )
pos.y = attr.y; pos.y = attr.y;
} }
RtlInitUnicodeString( &class_name, classW );
hwnd = NtUserCreateWindowEx( 0, &class_name, &class_name, NULL, style, pos.x, pos.y, hwnd = NtUserCreateWindowEx( 0, &class_name, &class_name, NULL, style, pos.x, pos.y,
attr.width, attr.height, parent, 0, NULL, NULL, 0, NULL, attr.width, attr.height, parent, 0, NULL, NULL, 0, NULL,
0, FALSE ); 0, FALSE );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment