[hackers] [tabbed][PATCH] Fix clients BadDrawable at cleanup with multiple tabs

From: Nikita Zlobin <nick87720z_AT_gmail.com>
Date: Thu, 4 Jun 2020 16:01:17 +0500

unmanage() after killclient() causes at least one BadDrawable from client.
For urxvtd it can crash entire daemon.
---
 tabbed.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tabbed.c b/tabbed.c
index 4ee4277..6b53d94 100644
--- a/tabbed.c
+++ b/tabbed.c
_AT_@ -219,10 +219,10 @@ cleanup(void)
 		focus(i);
 		killclient(NULL);
 		XReparentWindow(dpy, clients[i]->win, root, 0, 0);
-		unmanage(i);
 	}
 	free(clients);
 	clients = NULL;
+	XSync(dpy, False);
 
 	XFreePixmap(dpy, dc.drawable);
 	XFreeGC(dpy, dc.gc);
-- 
2.26.2
Received on Thu Jun 04 2020 - 13:01:17 CEST

This archive was generated by hypermail 2.3.0 : Thu Jun 04 2020 - 13:36:31 CEST