From 376e98c2c8db3e298d503ef5ccf2c78937adad9b Mon Sep 17 00:00:00 2001 From: okan Date: Thu, 2 Jan 2014 22:43:55 +0000 Subject: Accept _NET_CURRENT_DESKTOP ClientMessage; from Thomas Adam, though instead of group toggle, group only. --- xevents.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'xevents.c') diff --git a/xevents.c b/xevents.c index 4f74514..2898e6c 100644 --- a/xevents.c +++ b/xevents.c @@ -326,8 +326,11 @@ xev_handle_clientmessage(XEvent *ee) { XClientMessageEvent *e = &ee->xclient; struct client_ctx *cc, *old_cc; + struct screen_ctx *sc; - if ((cc = client_find(e->window)) == NULL) + sc = screen_fromroot(e->window); + + if ((cc = client_find(e->window)) == NULL && e->window != sc->rootwin) return; if (e->message_type == cwmh[WM_CHANGE_STATE] && e->format == 32 && @@ -349,6 +352,9 @@ xev_handle_clientmessage(XEvent *ee) if (e->message_type == ewmh[_NET_WM_STATE] && e->format == 32) xu_ewmh_handle_net_wm_state_msg(cc, e->data.l[0], e->data.l[1], e->data.l[2]); + + if (e->message_type == ewmh[_NET_CURRENT_DESKTOP] && e->format == 32) + group_only(sc, e->data.l[0]); } static void -- cgit 1.4.1