diff options
| author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-06-28 19:51:31 +0300 |
|---|---|---|
| committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-06-28 19:51:31 +0300 |
| commit | 7ce7b7b5d4b2bc5e79bbb7d23fb2e6096ce97f56 (patch) | |
| tree | cc8201094b748dd97e5bcbcf6795ed7335a403e3 | |
| parent | 3a4fa9c163f1288f0786d6a3af88e6d787354268 (diff) | |
rework unmapnotify function return condition
| -rw-r--r-- | monsterwm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/monsterwm.c b/monsterwm.c index 855ec99..22bf802 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -864,8 +864,9 @@ void tile(void) { /* windows that request to unmap should lose their * client, so no invisible windows exist on screen */ void unmapnotify(XEvent *e) { - Client *c = wintoclient(e->xunmap.window); - if (c && e->xunmap.send_event) { removeclient(c); desktopinfo(); } + Client *c = NULL; + if (!e->xunmap.send_event || !(c = wintoclient(e->xunmap.window))) return; + else { removeclient(c); desktopinfo(); } } /* find to which client the given window belongs to */ |
