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;
}