rem: while (event_count--) {
add: while (XPending(dpy) && event_count--) {
context: processEvents(int event_count){    XEvent event;    /*     * This is a hack. When animations are enabled, processing of      * events ocurred during a animation are delayed until it's end.     * Calls that consider the TimeStamp, like XSetInputFocus(), will     * fail because the TimeStamp is too old. Then, for example, if     * the user changes window focus while a miniaturize animation is     * in course, the window will not get focus properly after the end     * of the animation. This tries to workaround it by passing CurrentTime     * as the TimeStamp for XSetInputFocus() for all events ocurred during     * the animation.     */    ignoreTimestamp=1;    while (event_count--) {	WMNextEvent(dpy, &event);	WMHandleEvent(&event);    }    ignoreTimestamp=0;}