From 9a4d07d9de31c7bf3fba83c66d1a09d63848adfc Mon Sep 17 00:00:00 2001 From: Anselm R Garbe Date: Sat, 6 Sep 2008 08:59:51 +0100 Subject: applied Martin Hurton's checkotherwm simplification --- dwm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dwm.c b/dwm.c index 4ed5760f..e7804dc3 100644 --- a/dwm.c +++ b/dwm.c @@ -337,15 +337,14 @@ buttonpress(XEvent *e) { void checkotherwm(void) { otherwm = False; - XSetErrorHandler(xerrorstart); + xerrorxlib = XSetErrorHandler(xerrorstart); /* this causes an error if some other window manager is running */ XSelectInput(dpy, DefaultRootWindow(dpy), SubstructureRedirectMask); XSync(dpy, False); if(otherwm) die("dwm: another window manager is already running\n"); - XSetErrorHandler(NULL); - xerrorxlib = XSetErrorHandler(xerror); + XSetErrorHandler(xerror); XSync(dpy, False); } @@ -1625,7 +1624,7 @@ updatesizehints(Client *c) { else c->maxa = c->mina = 0.0; c->isfixed = (c->maxw && c->minw && c->maxh && c->minh - && c->maxw == c->minw && c->maxh == c->minh); + && c->maxw == c->minw && c->maxh == c->minh); } void -- cgit v1.2.3