Module: wine Branch: master Commit: 97cb5b9cb43cb432b1bcc389cef6f339337c4267 URL: https://gitlab.winehq.org/wine/wine/-/commit/97cb5b9cb43cb432b1bcc389cef6f33...
Author: Rémi Bernon rbernon@codeweavers.com Date: Fri May 3 14:44:42 2024 +0200
winex11: Remove duplicated foreign window class string constant.
---
dlls/winex11.drv/window.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index b5061463b10..f8202750695 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -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 ) { - 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; struct x11drv_win_data *data; HWND hwnd, parent; @@ -2181,7 +2180,7 @@ HWND create_foreign_window( Display *display, Window xwin ) unsigned int nchildren; XWindowAttributes attr; 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) { @@ -2191,7 +2190,7 @@ HWND create_foreign_window( Display *display, Window xwin ) memset( &class, 0, sizeof(class) ); class.cbSize = sizeof(class); class.lpfnWndProc = client_foreign_window_proc; - class.lpszClassName = classW; + class.lpszClassName = foreign_window_prop; if (!NtUserRegisterClassExWOW( &class, &class_name, &version, NULL, 0, 0, NULL ) && RtlGetLastWin32Error() != ERROR_CLASS_ALREADY_EXISTS) { @@ -2227,7 +2226,6 @@ HWND create_foreign_window( Display *display, Window xwin ) pos.y = attr.y; }
- RtlInitUnicodeString( &class_name, classW ); hwnd = NtUserCreateWindowEx( 0, &class_name, &class_name, NULL, style, pos.x, pos.y, attr.width, attr.height, parent, 0, NULL, NULL, 0, NULL, 0, FALSE );