From 904cac0e8d808313ed4d593ec837d170ff7eac92 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 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'xevents.c') diff --git a/xevents.c b/xevents.c index 1f5cdc4..f53122b 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.102 2014/01/02 22:26:27 okan Exp $ + * $OpenBSD: xevents.c,v 1.103 2014/01/02 22:43:55 okan Exp $ */ /* @@ -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 v1.2.3-2-gb3c3