dwm-meillo

diff event.c @ 292:4aa632b6ba66

changed main event loop
author Anselm R.Garbe <arg@10ksloc.org>
date Tue, 15 Aug 2006 07:31:42 +0200
parents 8e6e0aa5e2ae
children 1b45d6f14fca
line diff
     1.1 --- a/event.c	Mon Aug 14 19:18:02 2006 +0200
     1.2 +++ b/event.c	Tue Aug 15 07:31:42 2006 +0200
     1.3 @@ -384,3 +384,16 @@
     1.4  				GrabModeAsync, GrabModeAsync);
     1.5  	}
     1.6  }
     1.7 +
     1.8 +void
     1.9 +procevent()
    1.10 +{
    1.11 +	XEvent ev;
    1.12 +
    1.13 +	while(XPending(dpy)) {
    1.14 +		XNextEvent(dpy, &ev);
    1.15 +		if(handler[ev.type])
    1.16 +			(handler[ev.type])(&ev); /* call handler */
    1.17 +	}
    1.18 +}
    1.19 +