-/* menger, Copyright (c) 2001, 2002 Jamie Zawinski <jwz@jwz.org>
+/* menger, Copyright (c) 2001, 2002, 2004 Jamie Zawinski <jwz@jwz.org>
* Copyright (c) 2002 Aurelien Jacobs <aurel@gnuage.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
{ "-speed", ".speed", XrmoptionSepArg, 0 },
{ "-optimize", ".optimize", XrmoptionNoArg, "True" },
{ "+optimize", ".optimize", XrmoptionNoArg, "False" },
- {"-depth", ".maxDepth", XrmoptionSepArg, (caddr_t) 0 },
+ {"-depth", ".maxDepth", XrmoptionSepArg, 0 },
};
static argtype vars[] = {
- {(caddr_t *) &do_spin, "spin", "Spin", DEF_SPIN, t_Bool},
- {(caddr_t *) &do_wander, "wander", "Wander", DEF_WANDER, t_Bool},
- {(caddr_t *) &speed, "speed", "Speed", DEF_SPEED, t_Int},
- {(caddr_t *) &do_optimize, "optimize", "Optimize", DEF_OPTIMIZE, t_Bool},
- {(caddr_t *) &max_depth, "maxDepth", "MaxDepth", DEF_MAX_DEPTH, t_Int},
+ {&do_spin, "spin", "Spin", DEF_SPIN, t_Bool},
+ {&do_wander, "wander", "Wander", DEF_WANDER, t_Bool},
+ {&speed, "speed", "Speed", DEF_SPEED, t_Int},
+ {&do_optimize, "optimize", "Optimize", DEF_OPTIMIZE, t_Bool},
+ {&max_depth, "maxDepth", "MaxDepth", DEF_MAX_DEPTH, t_Int},
};
ModeSpecOpt sws_opts = {countof(opts), opts, countof(vars), vars, NULL};
sponge_configuration *sp = &sps[MI_SCREEN(mi)];
if (event->xany.type == ButtonPress &&
- event->xbutton.button & Button1)
+ event->xbutton.button == Button1)
{
sp->button_down_p = True;
gltrackball_start (sp->trackball,
return True;
}
else if (event->xany.type == ButtonRelease &&
- event->xbutton.button & Button1)
+ event->xbutton.button == Button1)
{
sp->button_down_p = False;
return True;
}
+ else if (event->xany.type == ButtonPress &&
+ (event->xbutton.button == Button4 ||
+ event->xbutton.button == Button5))
+ {
+ gltrackball_mousewheel (sp->trackball, event->xbutton.button, 5,
+ !!event->xbutton.state);
+ return True;
+ }
else if (event->xany.type == MotionNotify &&
sp->button_down_p)
{