Introduction
Introduction Statistics Contact Development Disclaimer Help
tremoved a bottleneck - dwm - [fork] customized build of dwm, the dynamic windo…
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit 6475be926bef4916ce632988a2fa408a637babc7
parent a1d0f819661f2be48f7a03ddd001f2a1a8f325e4
Author: Anselm R. Garbe <[email protected]>
Date: Fri, 14 Jul 2006 13:27:01 +0200
removed a bottleneck
Diffstat:
M main.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/main.c b/main.c
t@@ -283,7 +283,7 @@ main(int argc, char *argv[])
Mainloop:
while(running) {
FD_ZERO(&rd);
- FD_SET(0, &rd);
+ FD_SET(STDIN_FILENO, &rd);
FD_SET(ConnectionNumber(dpy), &rd);
i = select(ConnectionNumber(dpy) + 1, &rd, 0, 0, 0);
t@@ -292,12 +292,14 @@ Mainloop:
if(i < 0)
error("select failed\n");
else if(i > 0) {
- if(FD_ISSET(ConnectionNumber(dpy), &rd) && XPending(dp…
- XNextEvent(dpy, &ev);
- if(handler[ev.type])
- (handler[ev.type])(&ev); /* call handl…
+ if(FD_ISSET(ConnectionNumber(dpy), &rd)) {
+ while(XPending(dpy)) {
+ XNextEvent(dpy, &ev);
+ if(handler[ev.type])
+ (handler[ev.type])(&ev); /* ca…
+ }
}
- if(FD_ISSET(0, &rd)) {
+ if(FD_ISSET(STDIN_FILENO, &rd)) {
i = n = 0;
for(;;) {
if((i = getchar()) == EOF) {
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.