added a XFlush() in xbell().

This commit is contained in:
Aurélien Aptel 2010-08-29 19:14:05 +02:00
parent 2181040594
commit eab9aad1dc

3
st.c
View file

@ -230,6 +230,7 @@ void
xbell(void) { xbell(void) {
XSetForeground(xw.dis, dc.gc, dc.col[BellCol]); XSetForeground(xw.dis, dc.gc, dc.col[BellCol]);
XFillRectangle(xw.dis, xw.win, dc.gc, BORDER, BORDER, xw.bufw, xw.bufh); XFillRectangle(xw.dis, xw.win, dc.gc, BORDER, BORDER, xw.bufw, xw.bufh);
XFlush(xw.dis);
usleep(BellTime); usleep(BellTime);
draw(SCREEN_REDRAW); draw(SCREEN_REDRAW);
} }
@ -1293,7 +1294,7 @@ run(void) {
FD_ZERO(&rfd); FD_ZERO(&rfd);
FD_SET(cmdfd, &rfd); FD_SET(cmdfd, &rfd);
FD_SET(xfd, &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) if(errno == EINTR)
continue; continue;
die("select failed: %s\n", SERRNO); die("select failed: %s\n", SERRNO);