X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fglblur.c;h=9395d7c6997771dd0bf788f37b187a47153e9265;hb=2d04c4f22466851aedb6ed0f2919d148f726b889;hp=47edc52a07c109894236cf0bfe7a2033f34276ee;hpb=e4fa2ac140f7bc56571373a7b7eb585fa4500e38;p=xscreensaver diff --git a/hacks/glx/glblur.c b/hacks/glx/glblur.c index 47edc52a..9395d7c6 100644 --- a/hacks/glx/glblur.c +++ b/hacks/glx/glblur.c @@ -1,5 +1,5 @@ /* glblur --- radial blur using GL textures - * Copyright (c) 2002 Jamie Zawinski + * Copyright (c) 2002-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 @@ -363,7 +363,7 @@ glblur_handle_event (ModeInfo *mi, XEvent *event) glblur_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, @@ -372,11 +372,19 @@ glblur_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) {