+static void
+xlockmore_handle_events (ModeInfo *mi,
+ void (*reshape) (ModeInfo *, int, int),
+ Bool (*hook) (ModeInfo *, XEvent *))
+{
+ if (XtAppPending (app) & (XtIMTimer|XtIMAlternateInput))
+ XtAppProcessEvent (app, XtIMTimer|XtIMAlternateInput);
+
+ 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 if (hook && hook (mi, &event))
+ {
+ }
+ else
+ {
+ screenhack_handle_event (mi->dpy, &event);
+ }
+ }
+}
+