From fdaab55052eb25591e8736bb7f1fccff97d0d4e7 Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Sat, 30 Jun 2012 19:50:30 +0300 Subject: rework unmapnotify function - negate return conditional --- monsterwm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'monsterwm.c') diff --git a/monsterwm.c b/monsterwm.c index af40066..6ac0dab 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -862,9 +862,8 @@ 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 = NULL; - if (!e->xunmap.send_event || !(c = wintoclient(e->xunmap.window))) return; - else { removeclient(c); desktopinfo(); } + Client *c = wintoclient(e->xunmap.window); + if (e->xunmap.send_event && c) { removeclient(c); desktopinfo(); } } /* find to which client the given window belongs to */ -- cgit v1.3.1