commit ecd46ba

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