diff options
author | Robin Watts <robin.watts@artifex.com> | 2015-03-30 12:24:53 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2015-03-30 12:24:53 +0100 |
commit | a570160061f27cdf8ec11a7693d8b1432d288c25 (patch) | |
tree | b9b92e4fcfca7289001bed785ce09ba2d9b8d216 /platform/x11/x11_main.c | |
parent | 8a617ee3ae814fabdb526d5a7763764a2c88c736 (diff) | |
download | mupdf-a570160061f27cdf8ec11a7693d8b1432d288c25.tar.xz |
Bug 695558: Fix UTF-8 window titles on X11.
Adopt Guillume Duranceau's patch to set the NET_WM_NAME property for
window titles.
Diffstat (limited to 'platform/x11/x11_main.c')
-rw-r--r-- | platform/x11/x11_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/x11/x11_main.c b/platform/x11/x11_main.c index bf425c7a..3718c19d 100644 --- a/platform/x11/x11_main.c +++ b/platform/x11/x11_main.c @@ -69,6 +69,7 @@ static Atom XA_TARGETS; static Atom XA_TIMESTAMP; static Atom XA_UTF8_STRING; static Atom WM_DELETE_WINDOW; +static Atom NET_WM_NAME; static Atom NET_WM_STATE; static Atom NET_WM_STATE_FULLSCREEN; static Atom WM_RELOAD_PAGE; @@ -208,6 +209,7 @@ static void winopen(void) XA_TIMESTAMP = XInternAtom(xdpy, "TIMESTAMP", False); XA_UTF8_STRING = XInternAtom(xdpy, "UTF8_STRING", False); WM_DELETE_WINDOW = XInternAtom(xdpy, "WM_DELETE_WINDOW", False); + NET_WM_NAME = XInternAtom(xdpy, "_NET_WM_NAME", False); NET_WM_STATE = XInternAtom(xdpy, "_NET_WM_STATE", False); NET_WM_STATE_FULLSCREEN = XInternAtom(xdpy, "_NET_WM_STATE_FULLSCREEN", False); WM_RELOAD_PAGE = XInternAtom(xdpy, "_WM_RELOAD_PAGE", False); @@ -374,6 +376,8 @@ void wintitle(pdfapp_t *app, char *s) #else XmbSetWMProperties(xdpy, xwin, s, s, NULL, 0, NULL, NULL, NULL); #endif + XChangeProperty(xdpy, xwin, NET_WM_NAME, XA_UTF8_STRING, 8, + PropModeReplace, (unsigned char *)s, strlen(s)); } void winhelp(pdfapp_t *app) |