moved updatebarpos to screen
This commit is contained in:
		
							parent
							
								
									47765f7286
								
							
						
					
					
						commit
						b975c47280
					
				
							
								
								
									
										2
									
								
								dwm.h
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								dwm.h
									
									
									
									
									
								
							| @ -117,7 +117,6 @@ void grabkeys(void);			/* grab all keys defined in config.h */ | ||||
| /* main.c */ | ||||
| Bool gettextprop(Window w, Atom atom, | ||||
| 		char *text, unsigned int size); /* return text property, UTF-8 compliant */ | ||||
| void updatebarpos(void);		/* updates the bar position */ | ||||
| void quit(const char *arg);			/* quit dwm nicely */ | ||||
| int xerror(Display *dsply, XErrorEvent *ee);	/* dwm's X error handler */ | ||||
| 
 | ||||
| @ -142,6 +141,7 @@ void togglefloating(const char *arg);	/* toggles sel between floating/tiled stat | ||||
| void togglemax(const char *arg);	/* toggles maximization of floating client */ | ||||
| void toggletag(const char *arg);	/* toggles sel tags with arg's index */ | ||||
| void toggleview(const char *arg);	/* toggles the tag with arg's index (in)visible */ | ||||
| void updatebarpos(void);		/* updates the bar position */ | ||||
| void view(const char *arg);		/* views the tag with arg's index */ | ||||
| 
 | ||||
| /* util.c */ | ||||
|  | ||||
							
								
								
									
										26
									
								
								main.c
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								main.c
									
									
									
									
									
								
							| @ -253,32 +253,6 @@ quit(const char *arg) { | ||||
| 	readin = running = False; | ||||
| } | ||||
| 
 | ||||
| void | ||||
| updatebarpos(void) { | ||||
| 	XEvent ev; | ||||
| 
 | ||||
| 	wax = sx; | ||||
| 	way = sy; | ||||
| 	wah = sh; | ||||
| 	waw = sw; | ||||
| 	switch(bpos) { | ||||
| 	default: | ||||
| 		wah -= bh; | ||||
| 		way += bh; | ||||
| 		XMoveWindow(dpy, barwin, sx, sy); | ||||
| 		break; | ||||
| 	case BarBot: | ||||
| 		wah -= bh; | ||||
| 		XMoveWindow(dpy, barwin, sx, sy + wah); | ||||
| 		break; | ||||
| 	case BarOff: | ||||
| 		XMoveWindow(dpy, barwin, sx, sy - bh); | ||||
| 		break; | ||||
| 	} | ||||
| 	XSync(dpy, False); | ||||
| 	while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); | ||||
| } | ||||
| 
 | ||||
| /* There's no way to check accesses to destroyed windows, thus those cases are
 | ||||
|  * ignored (especially on UnmapNotify's).  Other types of errors call Xlibs | ||||
|  * default error handler, which may call exit. | ||||
|  | ||||
							
								
								
									
										26
									
								
								screen.c
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								screen.c
									
									
									
									
									
								
							| @ -369,6 +369,32 @@ toggleview(const char *arg) { | ||||
| 	arrange(); | ||||
| } | ||||
| 
 | ||||
| void | ||||
| updatebarpos(void) { | ||||
| 	XEvent ev; | ||||
| 
 | ||||
| 	wax = sx; | ||||
| 	way = sy; | ||||
| 	wah = sh; | ||||
| 	waw = sw; | ||||
| 	switch(bpos) { | ||||
| 	default: | ||||
| 		wah -= bh; | ||||
| 		way += bh; | ||||
| 		XMoveWindow(dpy, barwin, sx, sy); | ||||
| 		break; | ||||
| 	case BarBot: | ||||
| 		wah -= bh; | ||||
| 		XMoveWindow(dpy, barwin, sx, sy + wah); | ||||
| 		break; | ||||
| 	case BarOff: | ||||
| 		XMoveWindow(dpy, barwin, sx, sy - bh); | ||||
| 		break; | ||||
| 	} | ||||
| 	XSync(dpy, False); | ||||
| 	while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); | ||||
| } | ||||
| 
 | ||||
| void | ||||
| view(const char *arg) { | ||||
| 	unsigned int i; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Anselm R. Garbe
						Anselm R. Garbe