> The patch below fixes window names in non-xft window managers.
Is there some reason why a non-XFT WM shouldn't handle utf8 encoded
strings?
This patch just seems to discard the utf8 encoding and convert the
string to "plain" ascii instead - but I can't believe that is the proper
intent?
> --- src/x11/run.cxx.orig 2007-10-20 13:20:39 +0200
> +++ src/x11/run.cxx 2007-10-20 20:44:43 +0200
> @@ -2276,18 +2276,25 @@
> if (i && !parent()) {
> if (!name) name = "";
> int l = strlen(name);
> + char *buf = (char*) malloc(l + 1);
> + utf8toa(name, l, buf, l + 1);
> +
> //if (is_utf8(name,name+l)>=0)
> XChangeProperty(xdisplay, i->xid, _NET_WM_NAME,
> UTF8_STRING, 8, 0, (uchar*)name, l);
> XChangeProperty(xdisplay, i->xid, XA_WM_NAME,
> - XA_STRING, 8, 0, (uchar*)name, l);
> + XA_STRING, 8, 0, (uchar*)buf, strlen(buf));
> + free(buf);
> if (!iname) iname = filename_name(name);
> l = strlen(iname);
> + buf = (char*) malloc(l + 1);
> + utf8toa(iname, l, buf, l + 1);
> //if (is_utf8(iname,iname+l)>=0)
> XChangeProperty(xdisplay, i->xid, _NET_WM_ICON_NAME,
> UTF8_STRING, 8, 0, (uchar*)iname, l);
> XChangeProperty(xdisplay, i->xid, XA_WM_ICON_NAME,
> - XA_STRING, 8, 0, (uchar*)iname, l);
> + XA_STRING, 8, 0, (uchar*) buf, strlen(buf));
> + free(buf);
> }
> }
>
SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14
3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev