diff options
author | okan <okan> | 2014-01-03 14:23:50 +0000 |
---|---|---|
committer | okan <okan> | 2014-01-03 14:23:50 +0000 |
commit | f4c289b9e63c3daec2b6523871e07328dc778bb6 (patch) | |
tree | 5f7a62e413a7e25a9662bf2e23c3b0bb151b3cbb /xevents.c | |
parent | b387351df1593020665df5e5ee5d86d16ad8b7d6 (diff) | |
parent | 08342471c86ca88dbfe71fffa55697f92378ff76 (diff) | |
download | cwm-f4c289b9e63c3daec2b6523871e07328dc778bb6.tar.gz cwm-f4c289b9e63c3daec2b6523871e07328dc778bb6.tar.xz cwm-f4c289b9e63c3daec2b6523871e07328dc778bb6.zip |
cvsimport
Diffstat (limited to 'xevents.c')
-rw-r--r-- | xevents.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/xevents.c b/xevents.c index b1d4c64..f638fac 100644 --- a/xevents.c +++ b/xevents.c @@ -246,7 +246,7 @@ xev_handle_buttonpress(XEvent *ee) cc->sc = screen_fromroot(e->window); } - (*mb->callback)(cc, e); + (*mb->callback)(cc, &mb->argument); } static void @@ -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 && @@ -342,9 +345,16 @@ xev_handle_clientmessage(XEvent *ee) client_ptrsave(old_cc); client_ptrwarp(cc); } + + if (e->message_type == ewmh[_NET_WM_DESKTOP] && e->format == 32) + group_movetogroup(cc, e->data.l[0]); + 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 |