X-Git-Url: https://git.xinqibao.xyz/dwm.git/blobdiff_plain/c09bf8da071e05e2c1d714f0d31d41fe944bc11b..e6cbe9c11e88537d74eb094ba5844f71ee57f268:/main.c diff --git a/main.c b/main.c index 935d860..2d132a5 100644 --- a/main.c +++ b/main.c @@ -131,7 +131,7 @@ sendevent(Window w, Atom a, long value) e.xclient.data.l[0] = value; e.xclient.data.l[1] = CurrentTime; XSendEvent(dpy, w, False, NoEventMask, &e); - XFlush(dpy); + XSync(dpy, False); } void @@ -204,12 +204,12 @@ main(int argc, char *argv[]) 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 */