WM_NAME and WM_CLIENT_MACHINE should not be UTF8 strings, use proper
Xlib functions instead of manually setting the string property. SVN revision: 8982
This commit is contained in:
parent
50a3cd34cf
commit
cf99e62a4d
|
@ -180,16 +180,23 @@ ecore_x_window_defaults_set(Ecore_X_Window win)
|
|||
{
|
||||
long pid;
|
||||
char buf[MAXHOSTNAMELEN];
|
||||
char *hostname[1];
|
||||
int argc;
|
||||
char **argv;
|
||||
XTextProperty xprop;
|
||||
|
||||
/*
|
||||
* Set WM_CLIENT_MACHINE.
|
||||
*/
|
||||
gethostname(buf, MAXHOSTNAMELEN);
|
||||
buf[MAXHOSTNAMELEN - 1] = '\0';
|
||||
ecore_x_window_prop_string_set(win, _ecore_x_atom_wm_client_machine,
|
||||
(char *)buf);
|
||||
hostname[0] = buf;
|
||||
/* The ecore function uses UTF8 which Xlib may not like (especially
|
||||
* with older clients) */
|
||||
/* ecore_x_window_prop_string_set(win, _ecore_x_atom_wm_client_machine,
|
||||
(char *)buf); */
|
||||
if (XStringListToTextProperty(hostname, 1, &xprop))
|
||||
XSetWMClientMachine(_ecore_x_disp, win, &xprop);
|
||||
|
||||
/*
|
||||
* Set _NET_WM_PID
|
||||
|
|
|
@ -202,7 +202,16 @@ ecore_x_window_prop_string_get(Ecore_X_Window win, Ecore_X_Atom type)
|
|||
void
|
||||
ecore_x_window_prop_title_set(Ecore_X_Window win, const char *t)
|
||||
{
|
||||
ecore_x_window_prop_string_set(win, _ecore_x_atom_wm_name, (char *)t);
|
||||
char *list[1];
|
||||
XTextProperty xprop;
|
||||
|
||||
list[0] = (char *) t;
|
||||
|
||||
/* Xlib may not like the UTF8 String */
|
||||
/* ecore_x_window_prop_string_set(win, _ecore_x_atom_wm_name, (char *)t); */
|
||||
if (XStringListToTextProperty(list, 1, &xprop))
|
||||
XSetWMName(_ecore_x_disp, win, &xprop);
|
||||
|
||||
ecore_x_window_prop_string_set(win, _ecore_x_atom_net_wm_name, (char *)t);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue