dwm-meillo

diff main.c @ 316:d69cdb180a3e

small changes to dwm.1, rearranged order within main event loop
author Anselm R.Garbe <arg@10ksloc.org>
date Mon, 21 Aug 2006 07:31:15 +0200
parents 204427dcc087
children 45af6a8a0cbf
line diff
     1.1 --- a/main.c	Fri Aug 18 13:40:34 2006 +0200
     1.2 +++ b/main.c	Mon Aug 21 07:31:15 2006 +0200
     1.3 @@ -286,11 +286,9 @@
     1.4  			FD_SET(STDIN_FILENO, &rd);
     1.5  		FD_SET(xfd, &rd);
     1.6  		i = select(xfd + 1, &rd, NULL, NULL, NULL);
     1.7 -		if(i == -1 && errno == EINTR)
     1.8 +		if((i == -1) && (errno == EINTR))
     1.9  			continue;
    1.10 -		if(i < 0)
    1.11 -			eprint("select failed\n");
    1.12 -		else if(i > 0) {
    1.13 +		if(i > 0) {
    1.14  			if(readin && FD_ISSET(STDIN_FILENO, &rd)) {
    1.15  				readin = NULL != fgets(stext, sizeof(stext), stdin);
    1.16  				if(readin)
    1.17 @@ -300,6 +298,8 @@
    1.18  				drawstatus();
    1.19  			}
    1.20  		}
    1.21 +		else if(i < 0)
    1.22 +			eprint("select failed\n");
    1.23  		procevent();
    1.24  	}
    1.25  	cleanup();