X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fdangerball.c;h=31a67419865b107730efc7ba30850bf23b5232ce;hb=2d04c4f22466851aedb6ed0f2919d148f726b889;hp=fae186b79fefac78cbeba9ff06d0394a4b56a25d;hpb=e4fa2ac140f7bc56571373a7b7eb585fa4500e38;p=xscreensaver diff --git a/hacks/glx/dangerball.c b/hacks/glx/dangerball.c index fae186b7..31a67419 100644 --- a/hacks/glx/dangerball.c +++ b/hacks/glx/dangerball.c @@ -1,4 +1,4 @@ -/* dangerball, Copyright (c) 2001, 2002, 2003 Jamie Zawinski +/* dangerball, Copyright (c) 2001-2004 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -196,7 +196,7 @@ ball_handle_event (ModeInfo *mi, XEvent *event) ball_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, @@ -205,11 +205,19 @@ ball_handle_event (ModeInfo *mi, XEvent *event) 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) { @@ -266,7 +274,7 @@ init_ball (ModeInfo *mi) { double spin_speed = 10.0; - double wander_speed = 0.15; + double wander_speed = 0.12; double spin_accel = 2.0; bp->rot = make_rotator (do_spin ? spin_speed : 0,