Hello again,

On 11/22/13, Carlos Torres <vlaadbr...@gmail.com> wrote:
> On 11/22/13, Federico MP <bpm...@gmail.com> wrote:
>> I'm using st 0.4.1 and latest wmctrl and for wmctrl -l I'm getting:
> lol, i'm must not be on the tip! my bad...

it appears that st 0.4.1 sets WM_NAME as UTF8_STRING
and st 0.3 was setting it at STRING.

The attached patch reverts to setting WM_NAME to STRING
and adds _NET_WM_NAME in UTF8_STRING

--Carlos
From 62a85853afc32d14610c88add0aadf8f36a2c74f Mon Sep 17 00:00:00 2001
From: "Carlos J. Torres" <vlaadbr...@gmail.com>
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

Reply via email to