+Bool
+lament_handle_event (ModeInfo *mi, XEvent *event)
+{
+ lament_configuration *lc = &lcs[MI_SCREEN(mi)];
+
+ if (event->xany.type == ButtonPress &&
+ event->xbutton.button & Button1)
+ {
+ lc->button_down_p = True;
+ gltrackball_start (lc->trackball,
+ event->xbutton.x, event->xbutton.y,
+ MI_WIDTH (mi), MI_HEIGHT (mi));
+ return True;
+ }
+ else if (event->xany.type == ButtonRelease &&
+ event->xbutton.button & Button1)
+ {
+ lc->button_down_p = False;
+ return True;
+ }
+ else if (event->xany.type == MotionNotify &&
+ lc->button_down_p)
+ {
+ gltrackball_track (lc->trackball,
+ event->xmotion.x, event->xmotion.y,
+ MI_WIDTH (mi), MI_HEIGHT (mi));
+ return True;
+ }
+
+ return False;
+}
+
+