+ return get_time_resource (dpy, res_name, res_class, False);
+}
+
+
+/* A utility function for event-handler functions:
+ Returns True if the event is a simple click, Space, Tab, etc.
+ Returns False otherwise.
+ The idea here is that most hacks interpret to clicks or basic
+ keypresses as "change it up".
+
+ This isn't really the right file for this, but whatever.
+ */
+Bool
+screenhack_event_helper (Display *dpy, Window window, XEvent *event)
+{
+ if (event->xany.type == KeyPress)
+ {
+ KeySym keysym;
+ char c = 0;
+ XLookupString (&event->xkey, &c, 1, &keysym, 0);
+ if (c == ' ' || c == '\t' || c == '\r' || c == '\n' ||
+ keysym == XK_Left || keysym == XK_Right ||
+ keysym == XK_Up || keysym == XK_Down ||
+ keysym == XK_Prior || keysym == XK_Next)
+ return True;
+ }
+ else if (event->xany.type == ButtonPress)
+ {
+ if (event->xbutton.button == 1)
+ return True;
+ }
+
+ return False;