diff options
| author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-01-05 17:45:01 +0200 |
|---|---|---|
| committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-01-05 17:45:01 +0200 |
| commit | d18f17b8c94d882b25af1e9cb8394ecf182b7ecd (patch) | |
| tree | 04525f34ff416821f552ad1defaa200c3bbbf79e /monsterwm.c | |
| parent | 89a13964c1dbd5b0517b4b3e1b07778dae63a992 (diff) | |
rework clientmessage() function
Diffstat (limited to 'monsterwm.c')
| -rw-r--r-- | monsterwm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/monsterwm.c b/monsterwm.c index 5727a7b..0fd6379 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -215,10 +215,10 @@ void client_to_desktop(const Arg *arg) { * three actions: remove/unset _NET_WM_STATE_REMOVE=0, add/set _NET_WM_STATE_ADD=1, toggle _NET_WM_STATE_TOGGLE=2 */ void clientmessage(XEvent *e) { - client *c; - if (!(c = wintoclient(e->xclient.window)) || e->xclient.message_type != netatoms[NET_WM_STATE] || ((unsigned)e->xclient.data.l[1] - != netatoms[NET_FULLSCREEN] && (unsigned)e->xclient.data.l[2] != netatoms[NET_FULLSCREEN])) return; - setfullscreen(c, (e->xclient.data.l[0] == 1 || (e->xclient.data.l[0] == 2 && !c->isfullscreen))); + client *c = wintoclient(e->xclient.window); + if (c && e->xclient.message_type == netatoms[NET_WM_STATE] && ((unsigned)e->xclient.data.l[1] + == netatoms[NET_FULLSCREEN] || (unsigned)e->xclient.data.l[2] == netatoms[NET_FULLSCREEN])) + setfullscreen(c, (e->xclient.data.l[0] == 1 || (e->xclient.data.l[0] == 2 && !c->isfullscreen))); tile(); update_current(); } |
