view components/rdesktop/patches/g11n-i18n-title.patch @ 439:428482e36de8

1273 Update rdesktop to 1.7.0
author Gordon Ross <gwr@nexenta.com>
date Tue, 26 Jul 2011 23:48:03 +0100
parents
children
line wrap: on
line source

--- rdesktop-1.7.0/ewmhints.c.orig	2008-09-11 13:50:48.793730000 +0900
+++ rdesktop-1.7.0/ewmhints.c	2008-09-11 15:16:52.075814000 +0900
@@ -401,11 +401,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);
+	}
 }