[MPlayer-users] Movie title in title bar
Rickard Närström
rickard.narstrom at gmail.com
Tue Jun 13 13:32:18 CEST 2006
tisdag 13 juni 2006 12:54 skrev Albert Haeussler:
> I did not fully understand Rickard's remark - for non-latin1-characters
> in file names: where should I use _NET_WM_NAME?
>
> Cheers
It a litle more job to get it to work, but you will have support for filenames
with rare characters. Now pretty much only the english alfabeth, numbers and
some special characters such as !"#$&/(){[]} etc. work. (a total of 255
characters)
This is how it is done:
1. you need to intern a atom with:
Atom XA_NET_WM_NAME;
XA_NET_WM_NAME = XInternAtom(mDisplay, "_NET_WM_NAME", True);
2. you need to check that _NET_WM_NAME is in the _NET_SUPPORT propperty of the
root-window --- if I remembered right mplayer is geting this property -- it
is used in full-screen code.
3. To set the title you use, XmbTextListToTextProperty and XSetTextPropery:
XTextProperty basename_prop;
XmbTextListToTextProperty(mDisplay, &basename, 1, XUTF8StringStyle,
&basename_prop);
XSetTextProperty(mDisplay, vo_window, &basename_prop, XA_NET_WM_NAME);
And remember to use XStoreName as a backup if _NET_WM_NAME isn't in
_NET_SUPPORT or if _NET_SUPPORT property is missing to support old WMs.
More information about the MPlayer-users
mailing list