components/desktop/rdesktop/patches/rdesktop-02-g11n-i18n-title.patch
changeset 7330 e40cd9caccc7
equal deleted inserted replaced
7329:64b0ecdb0e74 7330:e40cd9caccc7
       
     1 Existing set of patches from the desktop gate.  Potentially send upstream
       
     2 
       
     3 --- rdesktop-1.6.0/ewmhints.c.orig	2008-09-11 13:50:48.793730000 +0900
       
     4 +++ rdesktop-1.6.0/ewmhints.c	2008-09-11 15:16:52.075814000 +0900
       
     5 @@ -402,11 +402,17 @@ ewmh_move_to_desktop(Window wnd, unsigne
       
     6  void
       
     7  ewmh_set_wm_name(Window wnd, const char *title)
       
     8  {
       
     9 -	int len;
       
    10 +	int len, res;
       
    11 +	XTextProperty property;
       
    12  
       
    13 -	len = strlen(title);
       
    14 -	XChangeProperty(g_display, wnd, g_net_wm_name_atom, g_utf8_string_atom,
       
    15 -			8, PropModeReplace, (unsigned char *) title, len);
       
    16 +	res = XmbTextListToTextProperty(g_display, (char**)&title, 1, XCompoundTextStyle, &property);
       
    17 +	if (res == Success) {
       
    18 +		XSetWMName(g_display, wnd, &property);
       
    19 +	} else {
       
    20 +		len = strlen(title);
       
    21 +		XChangeProperty(g_display, wnd, g_net_wm_name_atom, g_utf8_string_atom,
       
    22 +		                8, PropModeReplace, (unsigned char *) title, len);
       
    23 +	}
       
    24  }
       
    25  
       
    26