+
+
+static void
+xlockmore_reshape (Display *dpy, Window window, void *closure,
+ unsigned int w, unsigned int h)
+{
+ ModeInfo *mi = (ModeInfo *) closure;
+ if (mi->xlmft->hack_reshape)
+ {
+ XGetWindowAttributes (dpy, window, &mi->xgwa);
+ mi->xlmft->hack_reshape (mi, mi->xgwa.width, mi->xgwa.height);
+ }
+}
+
+static Bool
+xlockmore_event (Display *dpy, Window window, void *closure, XEvent *event)
+{
+ ModeInfo *mi = (ModeInfo *) closure;
+ if (mi->xlmft->hack_handle_events)
+ {
+ mi->xlmft->hack_handle_events (mi, event);
+ /* Since xlockmore hacks don't tell us whether they handled the
+ event, assume they handled buttons (so we don't beep) but that
+ they didn't handle anything else (so that "q" still quits).
+ */
+ return (event->xany.type == ButtonPress);
+ }
+ else
+ return False;
+}
+
+static void
+xlockmore_free (Display *dpy, Window window, void *closure)
+{
+ ModeInfo *mi = (ModeInfo *) closure;
+ if (mi->xlmft->hack_free)
+ mi->xlmft->hack_free (mi);
+#ifdef USE_GL
+/* ####
+ if (mi->fps_state)
+ fps_free (mi);
+ */
+#endif /* USE_GL */
+
+ XFreeGC (dpy, mi->gc);
+ free_colors (dpy, mi->xgwa.colormap, mi->colors, mi->npixels);
+ free (mi->colors);
+ free (mi->pixels);
+
+ free (mi);
+}
+