master net_wm_name.patch
ohmu  ·  2026-07-30
 1--- x11-screen.c
 2+++ x11-screen.c
 3@@ -561,7 +561,10 @@
 4 	XWindowAttributes wattr;
 5 	XWMHints hint;
 6 	Atom atoms[2];
 7+	Atom net_wm_name;
 8 	Xwin *w;
 9+	
10+	net_wm_name = 0;
11 
12 	USED(client);
13 	xscreen = DefaultScreenOfDisplay(_x.display);
14@@ -715,6 +718,10 @@
15 		&hint,		/* XA_WM_HINTS */
16 		&classhint	/* XA_WM_CLASSHINTS */
17 	);
18+	net_wm_name = XInternAtom(_x.display, "_NET_WM_NAME", False);
19+	XChangeProperty(_x.display, w->drawable, net_wm_name, 
20+                XInternAtom(_x.display, "UTF8_STRING", False), 8,
21+                PropModeReplace, (unsigned char*)label, strlen(label));
22 	XFlush(_x.display);
23 
24 	if(havemin){
25@@ -817,6 +824,9 @@
26 {
27 	Xwin *w = (Xwin*)client->view;
28 	XTextProperty name;
29+	Atom net_wm_name;
30+	
31+	net_wm_name = 0;
32 
33 	/*
34 	 * Label and other properties required by ICCCCM.
35@@ -841,6 +851,10 @@
36 		nil,		/* XA_WM_HINTS */
37 		nil	/* XA_WM_CLASSHINTS */
38 	);
39+	net_wm_name = XInternAtom(_x.display, "_NET_WM_NAME", False);
40+	XChangeProperty(_x.display, w->drawable, net_wm_name, 
41+                XInternAtom(_x.display, "UTF8_STRING", False), 8,
42+                PropModeReplace, (unsigned char*)label, strlen(label));
43 	XFlush(_x.display);
44 	xunlock();
45 }