From 7041be4c543a2335fc36db8bc649e620b0b04afc Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Sun, 5 Feb 2012 17:13:50 +0200 Subject: if client doesn't support WM_DELETE_WINDOW atom then actually kill the client --- monsterwm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'monsterwm.c') diff --git a/monsterwm.c b/monsterwm.c index 865d43c..8831eaa 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -474,7 +474,10 @@ void keypress(XEvent *e) { */ void killclient() { if (!current) return; - deletewindow(current->win); + Atom *protocols; int n = 0; + if (XGetWMProtocols(dis, current->win, &protocols, &n)) while(n-- && protocols[n] != wmatoms[WM_DELETE_WINDOW]); + if (n) deletewindow(current->win); + else XKillClient(dis, current->win); removeclient(current); } -- cgit v1.3.1