From c84145661e14cc62032f30c6a8c744ba84b95601 Mon Sep 17 00:00:00 2001 From: okan Date: Sun, 19 May 2013 17:05:52 +0000 Subject: [PATCH] add support for _NET_CLOSE_WINDOW --- calmwm.h | 1 + xevents.c | 3 +++ xutil.c | 1 + 3 files changed, 5 insertions(+) diff --git a/calmwm.h b/calmwm.h index 032e8b8..cf980e1 100644 --- a/calmwm.h +++ b/calmwm.h @@ -545,6 +545,7 @@ enum { _NET_WORKAREA, _NET_WM_NAME, _NET_WM_DESKTOP, + _NET_CLOSE_WINDOW, EWMH_NITEMS }; struct atom_ctx { diff --git a/xevents.c b/xevents.c index 174985d..91da64a 100644 --- a/xevents.c +++ b/xevents.c @@ -348,6 +348,9 @@ xev_handle_clientmessage(XEvent *ee) if (e->message_type == cwmh[WM_CHANGE_STATE].atom && e->format == 32 && e->data.l[0] == IconicState) client_hide(cc); + + if (e->message_type == ewmh[_NET_CLOSE_WINDOW].atom) + client_send_delete(cc); } static void diff --git a/xutil.c b/xutil.c index 764116a..d9f2106 100644 --- a/xutil.c +++ b/xutil.c @@ -256,6 +256,7 @@ struct atom_ctx ewmh[EWMH_NITEMS] = { {"_NET_WORKAREA", None}, {"_NET_WM_NAME", None}, {"_NET_WM_DESKTOP", None}, + {"_NET_CLOSE_WINDOW", None}, }; void