main.c
changeset 78 0d71fb80b592
parent 77 38c8f7f7d401
child 79 aabebd6e61f3
equal deleted inserted replaced
77:38c8f7f7d401 78:0d71fb80b592
   202 	/* check if another WM is already running */
   202 	/* check if another WM is already running */
   203 	otherwm = False;
   203 	otherwm = False;
   204 	XSetErrorHandler(xerrorstart);
   204 	XSetErrorHandler(xerrorstart);
   205 	/* this causes an error if some other WM is running */
   205 	/* this causes an error if some other WM is running */
   206 	XSelectInput(dpy, root, SubstructureRedirectMask);
   206 	XSelectInput(dpy, root, SubstructureRedirectMask);
   207 	XFlush(dpy);
   207 	XSync(dpy, False);
   208 
   208 
   209 	if(otherwm)
   209 	if(otherwm)
   210 		eprint("dwm: another window manager is already running\n");
   210 		eprint("dwm: another window manager is already running\n");
   211 
   211 
   212 	XSetErrorHandler(0);
   212 	XSetErrorHandler(NULL);
   213 	xerrorxlib = XSetErrorHandler(xerror);
   213 	xerrorxlib = XSetErrorHandler(xerror);
   214 
   214 
   215 	/* init atoms */
   215 	/* init atoms */
   216 	wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);
   216 	wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);
   217 	wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
   217 	wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False);