applied Martin Hurton's checkotherwm simplification
This commit is contained in:
		
							
								
								
									
										5
									
								
								dwm.c
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								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);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user