diff options
author | okan <okan> | 2013-07-15 14:50:44 +0000 |
---|---|---|
committer | okan <okan> | 2013-07-15 14:50:44 +0000 |
commit | 4119b5c065ee32189f26a0a95d4c36539003b142 (patch) | |
tree | 7aefb33035cda0f7ed0d5aafa9033e0d723487c1 /xevents.c | |
parent | bd7b8163bb0be2bd4904a179771a8f79163e8161 (diff) | |
download | cwm-4119b5c065ee32189f26a0a95d4c36539003b142.tar.gz cwm-4119b5c065ee32189f26a0a95d4c36539003b142.tar.xz cwm-4119b5c065ee32189f26a0a95d4c36539003b142.zip |
simplify atom handling; allows us to limit to one round-trip to server
for gathering Atoms.
Diffstat (limited to 'xevents.c')
-rw-r--r-- | xevents.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xevents.c b/xevents.c index 16bd10e..2d9f8dd 100644 --- a/xevents.c +++ b/xevents.c @@ -209,7 +209,7 @@ xev_handle_propertynotify(XEvent *ee) } else { TAILQ_FOREACH(sc, &Screenq, entry) { if (sc->rootwin == e->window) { - if (e->atom == ewmh[_NET_DESKTOP_NAMES].atom) + if (e->atom == ewmh[_NET_DESKTOP_NAMES]) group_update_names(sc); } } @@ -348,21 +348,21 @@ xev_handle_clientmessage(XEvent *ee) if ((cc = client_find(e->window)) == NULL) return; - if (e->message_type == cwmh[WM_CHANGE_STATE].atom && + if (e->message_type == cwmh[WM_CHANGE_STATE] && e->format == 32 && e->data.l[0] == IconicState) client_hide(cc); - if (e->message_type == ewmh[_NET_CLOSE_WINDOW].atom) + if (e->message_type == ewmh[_NET_CLOSE_WINDOW]) client_send_delete(cc); - if (e->message_type == ewmh[_NET_ACTIVE_WINDOW].atom && + if (e->message_type == ewmh[_NET_ACTIVE_WINDOW] && e->format == 32) { old_cc = client_current(); if (old_cc) client_ptrsave(old_cc); client_ptrwarp(cc); } - if (e->message_type == ewmh[_NET_WM_STATE].atom && + 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]); |