From 7fb7b1f4fc8afb1c921b73583452cfe54b132f90 Mon Sep 17 00:00:00 2001 From: fungt Date: Wed, 9 Feb 2011 00:23:36 +0800 Subject: Show correct utf-8 title --- window.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/window.c b/window.c index 23146cd..ed34cd8 100644 --- a/window.c +++ b/window.c @@ -243,6 +243,16 @@ void win_set_title(win_t *win, const char *title) { XStoreName(win->env.dpy, win->xwin, title); XSetIconName(win->env.dpy, win->xwin, title); + XChangeProperty( win->env.dpy, win->xwin, + XInternAtom(win->env.dpy, "_NET_WM_NAME", False), + XInternAtom(win->env.dpy, "UTF8_STRING", False), + 8, PropModeReplace, (unsigned char *) title, + strlen(title)); + XChangeProperty( win->env.dpy, win->xwin, + XInternAtom(win->env.dpy, "_NET_WM_ICON_NAME", False), + XInternAtom(win->env.dpy, "UTF8_STRING", False), + 8, PropModeReplace, (unsigned char *) title, + strlen(title)); } void win_set_cursor(win_t *win, win_cur_t cursor) { -- cgit v1.2.3