Introduction
Introduction Statistics Contact Development Disclaimer Help
tremoved procevent, more refactoring - dwm - [fork] customized build of dwm, th…
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit e9c49ddd7a021e99dc2e7518736211ab5bc8cf2c
parent f8415019d4edc1cd4f310adb256e6656e85bfe75
Author: Anselm R. Garbe <[email protected]>
Date: Mon, 19 Feb 2007 15:23:35 +0100
removed procevent, more refactoring
Diffstat:
M dwm.h | 1 -
M event.c | 11 -----------
M main.c | 8 ++++++--
3 files changed, 6 insertions(+), 14 deletions(-)
---
diff --git a/dwm.h b/dwm.h
t@@ -115,7 +115,6 @@ extern void zoom(Arg *arg); /* zoom…
/* event.c */
extern void grabkeys(void); /* grab all keys defined in…
-extern void procevent(void); /* process pending X event…
/* main.c */
extern void drawstatus(void); /* draw the bar */
diff --git a/event.c b/event.c
t@@ -368,14 +368,3 @@ grabkeys(void) {
GrabModeAsync, GrabModeAsync);
}
}
-
-void
-procevent(void) {
- XEvent ev;
-
- while(XPending(dpy)) {
- XNextEvent(dpy, &ev);
- if(handler[ev.type])
- (handler[ev.type])(&ev); /* call handler */
- }
-}
diff --git a/main.c b/main.c
t@@ -379,6 +379,7 @@ main(int argc, char *argv[]) {
char *p;
int r, xfd;
fd_set rd;
+ XEvent ev;
if(argc == 2 && !strncmp("-v", argv[1], 3)) {
fputs("dwm-"VERSION", (C)opyright MMVI-MMVII Anselm R. Garbe\n…
t@@ -411,7 +412,6 @@ main(int argc, char *argv[]) {
/* main event loop, also reads status text from stdin */
XSync(dpy, False);
- procevent();
readin = True;
while(running) {
FD_ZERO(&rd);
t@@ -443,7 +443,11 @@ main(int argc, char *argv[]) {
drawstatus();
}
if(FD_ISSET(xfd, &rd))
- procevent();
+ while(XPending(dpy)) {
+ XNextEvent(dpy, &ev);
+ if(handler[ev.type])
+ (handler[ev.type])(&ev); /* call handl…
+ }
}
cleanup();
XCloseDisplay(dpy);
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.