aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurélien Aptel <aurelien.aptel@gmail.com>2010-08-29 19:14:05 +0200
committerAurélien Aptel <aurelien.aptel@gmail.com>2010-08-29 19:14:05 +0200
commitacf921d410eeb50e8410840b6793872aff8ea5b7 (patch)
treeac488c4734352267b6f219220b3c95d834535244
parent5299e2bfa29a899a76a3cdcbc262690562244972 (diff)
downloadst-acf921d410eeb50e8410840b6793872aff8ea5b7.tar.gz
st-acf921d410eeb50e8410840b6793872aff8ea5b7.tar.bz2
added a XFlush() in xbell().
-rw-r--r--st.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/st.c b/st.c
index 9b77a0b..8f6aa04 100644
--- a/st.c
+++ b/st.c
@@ -230,6 +230,7 @@ void
xbell(void) {
XSetForeground(xw.dis, dc.gc, dc.col[BellCol]);
XFillRectangle(xw.dis, xw.win, dc.gc, BORDER, BORDER, xw.bufw, xw.bufh);
+ XFlush(xw.dis);
usleep(BellTime);
draw(SCREEN_REDRAW);
}
@@ -1293,7 +1294,7 @@ run(void) {
FD_ZERO(&rfd);
FD_SET(cmdfd, &rfd);
FD_SET(xfd, &rfd);
- if(select(MAX(xfd, cmdfd)+1, &rfd, NULL, NULL, NULL) == -1) {
+ if(select(MAX(xfd, cmdfd)+1, &rfd, NULL, NULL, NULL) < 0) {
if(errno == EINTR)
continue;
die("select failed: %s\n", SERRNO);