X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fglknots.c;h=14475cc42044c4b86c0d767cfedf7652d1126b12;hb=447db08c956099b3b183886729108bf5b364c4b8;hp=255bc36b488395a51f060ac0766998e942daf957;hpb=9c9d475ff889ed8be02e8ce8c17da28b93278fca;p=xscreensaver diff --git a/hacks/glx/glknots.c b/hacks/glx/glknots.c index 255bc36b..14475cc4 100644 --- a/hacks/glx/glknots.c +++ b/hacks/glx/glknots.c @@ -35,12 +35,6 @@ extern XtAppContext app; #define DEFAULTS "*delay: 30000 \n" \ "*showFPS: False \n" \ "*wireframe: False \n" \ - "*speed: " DEF_SPEED " \n" \ - "*spin: " DEF_SPIN "\n" \ - "*wander: " DEF_WANDER "\n" \ - "*thickness: " DEF_THICKNESS "\n" \ - "*segments: " DEF_SEGMENTS "\n" \ - "*duration: " DEF_DURATION "\n" \ #undef countof #define countof(x) (sizeof((x))/sizeof((*x))) @@ -245,7 +239,7 @@ knot_handle_event (ModeInfo *mi, XEvent *event) knot_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, @@ -254,11 +248,19 @@ knot_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, 5, + !!event->xbutton.state); + return True; + } else if (event->xany.type == MotionNotify && bp->button_down_p) {