/* -*- Mode: C; tab-width: 4 -*- */
/* vim: set ai ts=4 sw=4: */
-#if !defined( lint ) && !defined( SABER )
+#if 0
/*static const char sccsid[] = "@(#)gleidescope.c 1.0 03/06/27 xlockmore";*/
#endif
printf("event:%d\n", event->xany.type);
printf("button:%d\n", event->xbutton.button);
*/
- switch(event->xany.type)
- {
- case ButtonPress:
-
+ if (event->xany.type == ButtonPress)
+ {
if (event->xbutton.button == Button1 ||
event->xbutton.button == Button3)
{
return True;
}
#endif
- break;
-
- case ButtonRelease:
-
+ } else if (event->xany.type == ButtonRelease)
+ {
if (event->xbutton.button == Button1 ||
event->xbutton.button == Button3)
{
gp->button_down_p = False;
return True;
}
- break;
-
- case MotionNotify:
-
+ } else if (event->xany.type == MotionNotify)
+ {
if (gp->button_down_p)
{
/* update mouse position */
return True;
}
- break;
- }
+ }
+ else if (screenhack_event_helper (MI_DISPLAY(mi), MI_WINDOW(mi), event))
+ {
+ gp->start_time = -1;
+ gp->fade = 0;
+ return True;
+ }
return False;
}
mi->polygon_count = 0;
- glClearColor(0.5, 0.5, 0.5, 1.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
if ((gp->glx_context = init_GL(mi)) != NULL) {
reshape_gleidescope(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
+ clear_gl_error(); /* WTF? sometimes "invalid op" from glViewport! */
glDrawBuffer(GL_BACK);