diff -r 38c8f7f7d401 -r 0d71fb80b592 main.c --- a/main.c Sat Jul 15 17:19:19 2006 +0200 +++ b/main.c Sat Jul 15 18:11:14 2006 +0200 @@ -204,12 +204,12 @@ XSetErrorHandler(xerrorstart); /* this causes an error if some other WM is running */ XSelectInput(dpy, root, SubstructureRedirectMask); - XFlush(dpy); + XSync(dpy, False); if(otherwm) eprint("dwm: another window manager is already running\n"); - XSetErrorHandler(0); + XSetErrorHandler(NULL); xerrorxlib = XSetErrorHandler(xerror); /* init atoms */