JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
replaced Arg union with const char *arg, seems cleaner to me, even if we need atoi...
[dwm.git] / main.c
diff --git a/main.c b/main.c
index 73b713f..e6ba20c 100644 (file)
--- a/main.c
+++ b/main.c
@@ -21,7 +21,6 @@ char stext[256];
 int screen, sx, sy, sw, sh, wax, way, waw, wah;
 unsigned int bh, ntags, numlockmask;
 Atom wmatom[WMLast], netatom[NetLast];
-Bool running = True;
 Bool *seltag;
 Bool selscreen = True;
 Client *clients = NULL;
@@ -36,6 +35,7 @@ Window root, barwin;
 
 static int (*xerrorxlib)(Display *, XErrorEvent *);
 static Bool otherwm, readin;
+static Bool running = True;
 
 static void
 cleanup(void) {
@@ -236,7 +236,7 @@ sendevent(Window w, Atom a, long value) {
 }
 
 void
-quit(Arg *arg) {
+quit(const char *arg) {
        readin = running = False;
 }
 
@@ -325,12 +325,11 @@ main(int argc, char *argv[]) {
                        }
                        drawstatus();
                }
-               if(FD_ISSET(xfd, &rd))
-                       while(XPending(dpy)) {
-                               XNextEvent(dpy, &ev);
-                               if(handler[ev.type])
-                                       (handler[ev.type])(&ev); /* call handler */
-                       }
+               while(XPending(dpy)) {
+                       XNextEvent(dpy, &ev);
+                       if(handler[ev.type])
+                               (handler[ev.type])(&ev); /* call handler */
+               }
        }
        cleanup();
        XCloseDisplay(dpy);