[MPlayer-dev-eng] [Patch] Supporting unicode window title

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed May 4 23:24:57 CEST 2011


On Sun, May 01, 2011 at 10:25:08PM +0400, Vladimir Mosgalin wrote:
> 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.

What else is it if not UTF-8? Personally I strongly think that
needing this rather implies it is _not_ a decent window manager
(though past experience says such a thing is as real as
yellow unicorns).

>      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));

Please handle this in the same way as other Atoms are handled,
search the file for e.g. NET_WM_PID to see what to add where.
Maybe a bit overkill but better to keep it as consistent as
possible (though I admit _MOTIF_WM_HINTS and XV_COLORKEY atoms
already aren't implemented consistently).

> +    }
>  
>      return depth <= INT_MAX ? depth : 0;
>  }

> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng



More information about the MPlayer-dev-eng mailing list