-/* bouncingcow, Copyright (c) 2003 Jamie Zawinski <jwz@jwz.org>
+/* bouncingcow, Copyright (c) 2003, 2004 Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
#define EVENT_MASK PointerMotionMask
#define sws_opts xlockmore_opts
-#define DEF_SPEED "1.0"
+#define DEF_SPEED "0.7"
#define DEF_TEXTURE "(none)"
#define DEFAULTS "*delay: 30000 \n" \
static XrmOptionDescRec opts[] = {
{ "-speed", ".speed", XrmoptionSepArg, 0 },
{"-texture", ".texture", XrmoptionSepArg, 0 },
- {"+texture", ".texture", XrmoptionNoArg, (caddr_t) "(none)" },
+ {"+texture", ".texture", XrmoptionNoArg, "(none)" },
};
static argtype vars[] = {
- {(caddr_t *) &speed, "speed", "Speed", DEF_SPEED, t_Float},
- {(caddr_t *) &do_texture, "texture", "Texture", DEF_TEXTURE, t_String},
+ {&speed, "speed", "Speed", DEF_SPEED, t_Float},
+ {&do_texture, "texture", "Texture", DEF_TEXTURE, t_String},
};
ModeSpecOpt sws_opts = {countof(opts), opts, countof(vars), vars, NULL};
cow_configuration *bp = &bps[MI_SCREEN(mi)];
if (event->xany.type == ButtonPress &&
- event->xbutton.button & Button1)
+ event->xbutton.button == Button1)
{
bp->button_down_p = True;
gltrackball_start (bp->trackball,
return True;
}
else if (event->xany.type == ButtonRelease &&
- event->xbutton.button & Button1)
+ event->xbutton.button == Button1)
{
bp->button_down_p = False;
return True;
}
+ else if (event->xany.type == ButtonPress &&
+ (event->xbutton.button == Button4 ||
+ event->xbutton.button == Button5))
+ {
+ gltrackball_mousewheel (bp->trackball, event->xbutton.button, 10,
+ !event->xbutton.state);
+ return True;
+ }
else if (event->xany.type == MotionNotify &&
bp->button_down_p)
{