[hackers] [st] added a XFlush() in xbell(). || Aurélien Aptel

From: <hg_AT_suckless.org>
Date: Sun, 29 Aug 2010 16:16:34 +0000 (UTC)

changeset: 101:4e0d497345a0
user: Aurélien Aptel <aurelien.aptel_AT_gmail.com>
date: Sun Aug 29 19:14:05 2010 +0200
files: st.c
description:
added a XFlush() in xbell().

diff -r 5755b16c38b6 -r 4e0d497345a0 st.c
--- a/st.c Sun Aug 29 18:55:15 2010 +0200
+++ b/st.c Sun Aug 29 19:14:05 2010 +0200
@@ -230,6 +230,7 @@
 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 @@
                 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);
Received on Sun Aug 29 2010 - 18:16:34 CEST

This archive was generated by hypermail 2.2.0 : Sun Aug 29 2010 - 18:24:04 CEST