X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fflyingtoasters.c;h=31563189af84bdfc919408b7d57fa8ff751e97e5;hb=2d04c4f22466851aedb6ed0f2919d148f726b889;hp=32062f1b7d12e993d56ef45fe7a4b20b636f150d;hpb=9c9d475ff889ed8be02e8ce8c17da28b93278fca;p=xscreensaver diff --git a/hacks/glx/flyingtoasters.c b/hacks/glx/flyingtoasters.c index 32062f1b..31563189 100644 --- a/hacks/glx/flyingtoasters.c +++ b/hacks/glx/flyingtoasters.c @@ -153,8 +153,8 @@ static XrmOptionDescRec opts[] = { { "-speed", ".speed", XrmoptionSepArg, 0 }, { "-ntoasters", ".ntoasters", XrmoptionSepArg, 0 }, { "-nslices", ".nslices", XrmoptionSepArg, 0 }, - {"-texture", ".texture", XrmoptionNoArg, (caddr_t) "True" }, - {"+texture", ".texture", XrmoptionNoArg, (caddr_t) "False" }, + {"-texture", ".texture", XrmoptionNoArg, "True" }, + {"+texture", ".texture", XrmoptionNoArg, "False" }, }; static argtype vars[] = { @@ -324,7 +324,7 @@ toaster_handle_event (ModeInfo *mi, XEvent *event) toaster_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->user_trackball, @@ -333,11 +333,19 @@ toaster_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->user_trackball, event->xbutton.button, 5, + !event->xbutton.state); + return True; + } else if (event->xany.type == MotionNotify && bp->button_down_p) {