[hackers] [tabbed][PATCH] Update client name on _NET_WM_TITLE change too

From: Nikita Zlobin <nick87720z_AT_gmail.com>
Date: Sat, 13 Jun 2020 23:24:03 +0500

I got problem with xterm, though not urxvt - when title randomly was not
updated. By some reason sometimes WM_NAME prop event doesn't accompany
one for _NET_WM_NAME, despite its changed, thus missing update. One
nasty issue here - next update will supply previous name, though
eventually gives actual name. Checking for both WM_NAME and _NET_WM_NAME
does the fix.
---
 tabbed.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tabbed.c b/tabbed.c
index b4f8db4..899f417 100644
--- a/tabbed.c
+++ b/tabbed.c
_AT_@ -879,7 +879,7 @@ propertynotify(const XEvent *e)
 			}
 		}
 		XFree(wmh);
-	} else if (ev->state != PropertyDelete && ev->atom == XA_WM_NAME &&
+	} else if (ev->state != PropertyDelete && (ev->atom == XA_WM_NAME || ev->atom == wmatom[WMName]) &&
 	           (c = getclient(ev->window)) > -1) {
 		updatetitle(c);
 	}
-- 
2.26.2
Received on Sat Jun 13 2020 - 20:24:03 CEST

This archive was generated by hypermail 2.3.0 : Sat Jun 13 2020 - 20:36:30 CEST