diff options
| -rw-r--r-- | monsterwm.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); } |
