some sanity changes
This commit is contained in:
		
							
								
								
									
										14
									
								
								dwm.c
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								dwm.c
									
									
									
									
									
								
							@@ -666,7 +666,7 @@ void
 | 
				
			|||||||
expose(XEvent *e) {
 | 
					expose(XEvent *e) {
 | 
				
			||||||
	XExposeEvent *ev = &e->xexpose;
 | 
						XExposeEvent *ev = &e->xexpose;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if(ev->count == 0) {
 | 
						if(0 == ev->count) {
 | 
				
			||||||
		if(barwin == ev->window)
 | 
							if(barwin == ev->window)
 | 
				
			||||||
			drawbar();
 | 
								drawbar();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -780,7 +780,7 @@ gettextprop(Window w, Atom atom, char *text, unsigned int size) {
 | 
				
			|||||||
	int n;
 | 
						int n;
 | 
				
			||||||
	XTextProperty name;
 | 
						XTextProperty name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if(!text || size == 0)
 | 
						if(!text || 0 == size)
 | 
				
			||||||
		return False;
 | 
							return False;
 | 
				
			||||||
	text[0] = '\0';
 | 
						text[0] = '\0';
 | 
				
			||||||
	XGetTextProperty(dpy, w, &name, atom);
 | 
						XGetTextProperty(dpy, w, &name, atom);
 | 
				
			||||||
@@ -1398,7 +1398,7 @@ setmwfact(const char *arg) {
 | 
				
			|||||||
	if(!(ISTILE))
 | 
						if(!(ISTILE))
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	/* arg handling, manipulate mwfact */
 | 
						/* arg handling, manipulate mwfact */
 | 
				
			||||||
	if(arg == NULL)
 | 
						if(NULL == arg)
 | 
				
			||||||
		mwfact = MWFACT;
 | 
							mwfact = MWFACT;
 | 
				
			||||||
	else if(1 == sscanf(arg, "%lf", &delta)) {
 | 
						else if(1 == sscanf(arg, "%lf", &delta)) {
 | 
				
			||||||
		if(arg[0] == '+' || arg[0] == '-')
 | 
							if(arg[0] == '+' || arg[0] == '-')
 | 
				
			||||||
@@ -1515,8 +1515,8 @@ spawn(const char *arg) {
 | 
				
			|||||||
		return;
 | 
							return;
 | 
				
			||||||
	/* The double-fork construct avoids zombie processes and keeps the code
 | 
						/* The double-fork construct avoids zombie processes and keeps the code
 | 
				
			||||||
	 * clean from stupid signal handlers. */
 | 
						 * clean from stupid signal handlers. */
 | 
				
			||||||
	if(fork() == 0) {
 | 
						if(0 == fork()) {
 | 
				
			||||||
		if(fork() == 0) {
 | 
							if(0 == fork()) {
 | 
				
			||||||
			if(dpy)
 | 
								if(dpy)
 | 
				
			||||||
				close(ConnectionNumber(dpy));
 | 
									close(ConnectionNumber(dpy));
 | 
				
			||||||
			setsid();
 | 
								setsid();
 | 
				
			||||||
@@ -1576,7 +1576,7 @@ tile(void) {
 | 
				
			|||||||
	nw = 0; /* gcc stupidity requires this */
 | 
						nw = 0; /* gcc stupidity requires this */
 | 
				
			||||||
	for(i = 0, c = mc = nexttiled(clients); c; c = nexttiled(c->next), i++) {
 | 
						for(i = 0, c = mc = nexttiled(clients); c; c = nexttiled(c->next), i++) {
 | 
				
			||||||
		c->ismax = False;
 | 
							c->ismax = False;
 | 
				
			||||||
		if(i == 0) { /* master */
 | 
							if(0 == i) { /* master */
 | 
				
			||||||
			nw = mw - 2 * c->border;
 | 
								nw = mw - 2 * c->border;
 | 
				
			||||||
			nh = wah - 2 * c->border;
 | 
								nh = wah - 2 * c->border;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
@@ -1836,7 +1836,7 @@ view(const char *arg) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	memcpy(prevtags, seltags, sizeof seltags);
 | 
						memcpy(prevtags, seltags, sizeof seltags);
 | 
				
			||||||
	for(i = 0; i < NTAGS; i++)
 | 
						for(i = 0; i < NTAGS; i++)
 | 
				
			||||||
		seltags[i] = arg == NULL;
 | 
							seltags[i] = (NULL == arg);
 | 
				
			||||||
	seltags[idxoftag(arg)] = True;
 | 
						seltags[idxoftag(arg)] = True;
 | 
				
			||||||
	arrange();
 | 
						arrange();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user