[MPlayer-dev-eng] [PATCH] Use _NET_WM_NAME for UTF-8 title in X11 if supported
Rickard Närström
rickard.narstrom at gmail.com
Tue Jun 20 21:26:11 CEST 2006
tisdag 20 juni 2006 21:11 skrev Reimar Döffinger:
> setlocale is forbidden (with the mp_msg.c exception).
How is Xlib suppose to know the locale settings otherways? Xlib uses LC_CTYPE
locale setting to figure out local characterset to use with
XmbTextListToTextProperty....
hmm... I coud use MSG_CHARSET, iconv and Xutf8TextListToTextProperty... is
that a better solution?
> > @@ -1890,6 +1897,18 @@
> > }
> > #endif
> >
> > +void vo_x11_store_name(Display *dpy, Window win, const char *name) {
> > + if(vo_wm_type & vo_wm_NAME) {
> > + XTextProperty name_prop;
> > +
> > + XmbTextListToTextProperty(dpy, (char **)&name, 1, XUTF8StringStyle,
> > &name_prop); + XSetTextProperty(dpy, win, &name_prop, XA_NET_WM_NAME);
> > + } else {
> > + /* Backup for non NET WMs */
> > + XStoreName(dpy, win, name);
> > + }
> > +}
> > +
>
> Isn't it possible to just do both always? It wouldn't have to be an
> option then either.
Yes, it is posible to use both... (see atachment)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-title.patch
Type: text/x-diff
Size: 4062 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060620/9b824826/attachment.patch>
More information about the MPlayer-dev-eng
mailing list