From 62a85853afc32d14610c88add0aadf8f36a2c74f Mon Sep 17 00:00:00 2001 From: "Carlos J. Torres" Date: Fri, 22 Nov 2013 10:45:48 -0500 Subject: [PATCH] add _NET_WM_NAME --- st.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/st.c b/st.c index fda7044..5ad483b 100644 --- a/st.c +++ b/st.c @@ -239,7 +239,7 @@ typedef struct { Colourmap cmap; Window win; Drawable buf; - Atom xembed, wmdeletewin; + Atom xembed, wmdeletewin, netwmname; XIM xim; XIC xic; Draw draw; @@ -3023,6 +3023,7 @@ xinit(void) { xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False); xw.wmdeletewin = XInternAtom(xw.dpy, "WM_DELETE_WINDOW", False); + xw.netwmname = XInternAtom(xw.dpy, "_NET_WM_NAME", False); XSetWMProtocols(xw.dpy, xw.win, &xw.wmdeletewin, 1); xresettitle(); @@ -3352,10 +3353,15 @@ void xsettitle(char *p) { XTextProperty prop; - Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle, + Xutf8TextListToTextProperty(xw.dpy, &p, 1, XStringStyle, &prop); XSetWMName(xw.dpy, xw.win, &prop); XFree(prop.value); + + Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle, + &prop); + XSetTextProperty(xw.dpy, xw.win, &prop, xw.netwmname); + XFree(prop.value); } void -- 1.7.10.4