diff options
author | okan | 2014-01-02 22:43:55 +0000 |
---|---|---|
committer | okan | 2014-01-02 22:43:55 +0000 |
commit | 904cac0e8d808313ed4d593ec837d170ff7eac92 (patch) | |
tree | 95b7f00bb6923c591d57701a772e2d5ad5c6c2c7 /xevents.c | |
parent | 4b9c8d497017a2ae91416a04ee4557752e07b7fd (diff) | |
download | cwm-904cac0e8d808313ed4d593ec837d170ff7eac92.tar.gz |
Accept _NET_CURRENT_DESKTOP ClientMessage; from Thomas Adam, though
instead of group toggle, group only.
Diffstat (limited to '')
-rw-r--r-- | xevents.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 |