X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fcubenetic.c;h=44f2b73f9b9e28f6726dee966840a9c1195d82c5;hp=84e2726490f1ccf03d3fe1cae51e87b085e61ef8;hb=2d04c4f22466851aedb6ed0f2919d148f726b889;hpb=bc7b7a8eb122206d239ec0e693676bcce31be1aa diff --git a/hacks/glx/cubenetic.c b/hacks/glx/cubenetic.c index 84e27264..44f2b73f 100644 --- a/hacks/glx/cubenetic.c +++ b/hacks/glx/cubenetic.c @@ -349,7 +349,7 @@ cube_handle_event (ModeInfo *mi, XEvent *event) cube_configuration *cc = &ccs[MI_SCREEN(mi)]; if (event->xany.type == ButtonPress && - event->xbutton.button & Button1) + event->xbutton.button == Button1) { cc->button_down_p = True; gltrackball_start (cc->trackball, @@ -358,11 +358,19 @@ cube_handle_event (ModeInfo *mi, XEvent *event) return True; } else if (event->xany.type == ButtonRelease && - event->xbutton.button & Button1) + event->xbutton.button == Button1) { cc->button_down_p = False; return True; } + else if (event->xany.type == ButtonPress && + (event->xbutton.button == Button4 || + event->xbutton.button == Button5)) + { + gltrackball_mousewheel (cc->trackball, event->xbutton.button, 10, + !!event->xbutton.state); + return True; + } else if (event->xany.type == MotionNotify && cc->button_down_p) {