set WM_NAME and WN_ICON_NAME properly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



X11DRV_SetWindowText() sets WM_NAME and WM_ICON_NAME as type STRING
regardless of actual encoding. They should be stored in COMPOUND_TEXT
format.
diff -uNr wine-20030508.orig/dlls/x11drv/window.c wine-20030508/dlls/x11drv/window.c
--- wine-20030508.orig/dlls/x11drv/window.c	2003-05-04 11:27:20.000000000 +0900
+++ wine-20030508/dlls/x11drv/window.c	2003-06-09 23:55:41.000000000 +0900
@@ -770,6 +770,7 @@
     char *utf8_buffer;
     static UINT text_cp = (UINT)-1;
     Window win;
+    XTextProperty prop;
 
     if ((win = X11DRV_get_whole_window( hwnd )))
     {
@@ -807,8 +808,12 @@
         WideCharToMultiByte(CP_UTF8, 0, text, strlenW(text), utf8_buffer, count, NULL, NULL);
 
         wine_tsx11_lock();
-        XStoreName( display, win, buffer );
-        XSetIconName( display, win, buffer );
+	if (XmbTextListToTextProperty( display, &buffer, 1, XStdICCTextStyle, &prop ) == Success)
+	{
+	    XSetWMName( display, win, &prop );
+	    XSetWMIconName( display, win, &prop );
+	    XFree( prop.value );
+	}
         /*
         Implements a NET_WM UTF-8 title. It should be without a trailing \0,
         according to the standard

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux