Accept _NET_CURRENT_DESKTOP ClientMessage; from Thomas Adam, though

instead of group toggle, group only.
This commit is contained in:
okan 2014-01-02 22:43:55 +00:00
parent 5a5e7441e1
commit 376e98c2c8

View File

@ -326,8 +326,11 @@ xev_handle_clientmessage(XEvent *ee)
{ {
XClientMessageEvent *e = &ee->xclient; XClientMessageEvent *e = &ee->xclient;
struct client_ctx *cc, *old_cc; 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; return;
if (e->message_type == cwmh[WM_CHANGE_STATE] && e->format == 32 && 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) if (e->message_type == ewmh[_NET_WM_STATE] && e->format == 32)
xu_ewmh_handle_net_wm_state_msg(cc, xu_ewmh_handle_net_wm_state_msg(cc,
e->data.l[0], e->data.l[1], e->data.l[2]); 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 static void