dwm/dwm.c.rej

25 lines
527 B
Plaintext
Raw Normal View History

2022-12-01 23:27:51 +00:00
--- dwm.c
+++ dwm.c
@@ -2018,8 +2049,20 @@ updatesizehints(Client *c)
void
updatestatus(void)
{
- if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext)))
+ char text[512];
+ if (!gettextprop(root, XA_WM_NAME, text, sizeof(text))) {
strcpy(stext, "dwm-"VERSION);
+ estext[0] = '\0';
+ } else {
+ char *e = strchr(text, statussep);
+ if (e) {
+ *e = '\0'; e++;
+ strncpy(estext, e, sizeof(estext) - 1);
+ } else {
+ estext[0] = '\0';
+ }
+ strncpy(stext, text, sizeof(stext) - 1);
+ }
drawbar(selmon);
}