X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Flavalite.c;h=c97c7929b4ae49febddcb3ddceb3990d4f2b577d;hp=c544e72cd18c0a39fbc2115bd2fa39df05080c67;hb=2d04c4f22466851aedb6ed0f2919d148f726b889;hpb=bc7b7a8eb122206d239ec0e693676bcce31be1aa diff --git a/hacks/glx/lavalite.c b/hacks/glx/lavalite.c index c544e72c..c97c7929 100644 --- a/hacks/glx/lavalite.c +++ b/hacks/glx/lavalite.c @@ -1267,7 +1267,7 @@ lavalite_handle_event (ModeInfo *mi, XEvent *event) lavalite_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, @@ -1276,11 +1276,19 @@ lavalite_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) { @@ -1298,7 +1306,7 @@ static void parse_color (ModeInfo *mi, const char *name, const char *s, GLfloat *a) { XColor c; - a[4] = 1.0; /* alpha */ + a[3] = 1.0; /* alpha */ if (! XParseColor (MI_DISPLAY(mi), MI_COLORMAP(mi), s, &c)) {