patches/rdesktop-02-g11n-i18n-title.diff
author Jon Tibble <meths@btinternet.com>
Sat, 06 Oct 2012 16:11:50 +0100
branchs11express-2010-11
changeset 22109 db10202d5f6d
parent 18110 93461edb1490
permissions -rw-r--r--
Added tag oi_151a_prestable7 for changeset 25dee50cecca

--- rdesktop-1.6.0/ewmhints.c.orig	2008-09-11 13:50:48.793730000 +0900
+++ rdesktop-1.6.0/ewmhints.c	2008-09-11 15:16:52.075814000 +0900
@@ -402,11 +402,17 @@ ewmh_move_to_desktop(Window wnd, unsigne
 void
 ewmh_set_wm_name(Window wnd, const char *title)
 {
-	int len;
+	int len, res;
+	XTextProperty property;
 
-	len = strlen(title);
-	XChangeProperty(g_display, wnd, g_net_wm_name_atom, g_utf8_string_atom,
-			8, PropModeReplace, (unsigned char *) title, len);
+	res = XmbTextListToTextProperty(g_display, (char**)&title, 1, XCompoundTextStyle, &property);
+	if (res == Success) {
+		XSetWMName(g_display, wnd, &property);
+	} else {
+		len = strlen(title);
+		XChangeProperty(g_display, wnd, g_net_wm_name_atom, g_utf8_string_atom,
+		                8, PropModeReplace, (unsigned char *) title, len);
+	}
 }