+static void
+xlockmore_handle_events (ModeInfo *mi,
+ void (*reshape) (ModeInfo *, int, int))
+{
+ while (XPending (mi->dpy))
+ {
+ XEvent event;
+ XNextEvent (mi->dpy, &event);
+ if (reshape && event.xany.type == ConfigureNotify)
+ {
+ XGetWindowAttributes (mi->dpy, mi->window, &mi->xgwa);
+ reshape (mi, mi->xgwa.width, mi->xgwa.height);
+ }
+ else
+ {
+ screenhack_handle_event (mi->dpy, &event);
+ }
+ }
+}
+