[MPlayer-dev-eng] [Patch] Supporting unicode window title
Vladimir Mosgalin
mosgalin at VM10124.spb.edu
Sun May 1 20:25:08 CEST 2011
Hello everybody,
I'm running mplayer in window lately, and got sick watching at ugly
chars in window title with
use-filename-title = on
option (russian and asian letters look completely wrong, european
symbols like ä render with extra symbol/distorted). Fortunately, it's
easy to fix by adding a hint.. should work with any descent window
manager. Patch attached.
--
Vladimir
-------------- next part --------------
diff -ur mplayer-old/libvo/x11_common.c mplayer/libvo/x11_common.c
--- mplayer-old/libvo/x11_common.c 2011-05-01 22:05:11.983247890 +0400
+++ mplayer/libvo/x11_common.c 2011-05-01 22:21:10.985382299 +0400
@@ -1349,7 +1349,14 @@
XTranslateCoordinates(mDisplay, vo_window, mRootWin, 0, 0, &vo_dx, &vo_dy,
&dummy_win);
if (vo_wintitle)
+ {
XStoreName(mDisplay, vo_window, vo_wintitle);
+ XChangeProperty(mDisplay, vo_window,
+ XInternAtom(mDisplay, "_NET_WM_NAME", False),
+ XInternAtom(mDisplay, "UTF8_STRING", False),
+ 8, PropModeReplace, (unsigned char *) vo_wintitle,
+ strlen(vo_wintitle));
+ }
return depth <= INT_MAX ? depth : 0;
}
More information about the MPlayer-dev-eng
mailing list