X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fqueens.c;h=46898dd7c31e3784da2d77ca3cc2938e1159767b;hp=e6e0644660cbaab296a14ab7cc13b922e8c5217d;hb=2d04c4f22466851aedb6ed0f2919d148f726b889;hpb=bc7b7a8eb122206d239ec0e693676bcce31be1aa diff --git a/hacks/glx/queens.c b/hacks/glx/queens.c index e6e06446..46898dd7 100644 --- a/hacks/glx/queens.c +++ b/hacks/glx/queens.c @@ -115,7 +115,7 @@ queens_handle_event (ModeInfo *mi, XEvent *event) Queenscreen *c = &qs[MI_SCREEN(mi)]; if (event->xany.type == ButtonPress && - event->xbutton.button & Button1) + event->xbutton.button == Button1) { c->button_down_p = True; gltrackball_start (c->trackball, @@ -124,11 +124,19 @@ queens_handle_event (ModeInfo *mi, XEvent *event) return True; } else if (event->xany.type == ButtonRelease && - event->xbutton.button & Button1) + event->xbutton.button == Button1) { c->button_down_p = False; return True; } + else if (event->xany.type == ButtonPress && + (event->xbutton.button == Button4 || + event->xbutton.button == Button5)) + { + gltrackball_mousewheel (c->trackball, event->xbutton.button, 5, + !event->xbutton.state); + return True; + } else if (event->xany.type == MotionNotify && c->button_down_p) {