aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorAnselm R.Garbe <arg@10ksloc.org>2006-08-21 07:31:15 +0200
committerAnselm R.Garbe <arg@10ksloc.org>2006-08-21 07:31:15 +0200
commitb43989207a949cbc17182b451aa527afe542c98f (patch)
tree289483d500e9821f2db3cbdc56d186d95949291d /main.c
parent2eebebf26243a4a80d646c85db2b9c9ebd168743 (diff)
downloaddwm-b43989207a949cbc17182b451aa527afe542c98f.tar.gz
small changes to dwm.1, rearranged order within main event loop
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main.c b/main.c
index d566c9e..1bc4068 100644
--- a/main.c
+++ b/main.c
@@ -286,11 +286,9 @@ main(int argc, char *argv[])
FD_SET(STDIN_FILENO, &rd);
FD_SET(xfd, &rd);
i = select(xfd + 1, &rd, NULL, NULL, NULL);
- if(i == -1 && errno == EINTR)
+ if((i == -1) && (errno == EINTR))
continue;
- if(i < 0)
- eprint("select failed\n");
- else if(i > 0) {
+ if(i > 0) {
if(readin && FD_ISSET(STDIN_FILENO, &rd)) {
readin = NULL != fgets(stext, sizeof(stext), stdin);
if(readin)
@@ -300,6 +298,8 @@ main(int argc, char *argv[])
drawstatus();
}
}
+ else if(i < 0)
+ eprint("select failed\n");
procevent();
}
cleanup();