diff options
| author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-02-05 17:13:50 +0200 |
|---|---|---|
| committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-02-05 17:13:50 +0200 |
| commit | 7041be4c543a2335fc36db8bc649e620b0b04afc (patch) | |
| tree | 6df2a536ac438f496a79519774d55a0378d2c1b3 /monsterwm.c | |
| parent | be52dcfffd2e538e48eed720f7343045bf350ab3 (diff) | |
if client doesn't support WM_DELETE_WINDOW atom then actually kill the client
Diffstat (limited to 'monsterwm.c')
| -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); } |
