aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calmwm.h3
-rw-r--r--xevents.c5
-rw-r--r--xutil.c3
3 files changed, 8 insertions, 3 deletions
diff --git a/calmwm.h b/calmwm.h
index 928dd48..ae10d8b 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: calmwm.h,v 1.201 2013/05/19 17:03:55 okan Exp $
+ * $OpenBSD: calmwm.h,v 1.202 2013/05/19 17:05:52 okan Exp $
*/
#ifndef _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 f3e7221..de6620a 100644
--- a/xevents.c
+++ b/xevents.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: xevents.c,v 1.78 2013/05/19 17:03:55 okan Exp $
+ * $OpenBSD: xevents.c,v 1.79 2013/05/19 17:05:52 okan Exp $
*/
/*
@@ -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 67f5604..e78680e 100644
--- a/xutil.c
+++ b/xutil.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: xutil.c,v 1.60 2013/05/19 17:03:55 okan Exp $
+ * $OpenBSD: xutil.c,v 1.61 2013/05/19 17:05:52 okan Exp $
*/
#include <sys/param.h>
@@ -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