[MPlayer-dev-eng] [PATCH] Use _NET_WM_NAME for UTF-8 title in X11 if supported

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Jun 20 21:11:40 CEST 2006


Hi,
On Tue, Jun 20, 2006 at 03:28:00PM +0200, Rickard N?rstr?m wrote:
> @@ -412,6 +417,8 @@
>  // Window    mRootWin;
>      XWindowAttributes attribs;
>      char *dispName;
> +
> +    setlocale(LC_CTYPE, "");

setlocale is forbidden (with the mp_msg.c exception).

> @@ -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.

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list