X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fmoebius.c;h=c3bcaf81523f915027198534f56a35993a5ac51d;hb=3f438031d610c7e15fd33876a879b97e290e05fb;hp=97e7824ffcf7c78def6550eb3550174789847d25;hpb=e4fa2ac140f7bc56571373a7b7eb585fa4500e38;p=xscreensaver diff --git a/hacks/glx/moebius.c b/hacks/glx/moebius.c index 97e7824f..c3bcaf81 100644 --- a/hacks/glx/moebius.c +++ b/hacks/glx/moebius.c @@ -91,8 +91,7 @@ static const char sccsid[] = "@(#)moebius.c 5.01 2001/03/01 xlockmore"; # define EVENT_MASK PointerMotionMask # define moebius_opts xlockmore_opts # define DEFAULTS "*delay: 20000 \n" \ - "*showFPS: False \n" \ - "*wireframe: False \n" + "*showFPS: False \n" # include "xlockmore.h" /* from the xscreensaver distribution */ #else /* !STANDALONE */ # include "xlock.h" /* from the xlockmore distribution */ @@ -115,10 +114,10 @@ static int noants; static XrmOptionDescRec opts[] = { - {(char *) "-solidmoebius", (char *) ".moebius.solidmoebius", XrmoptionNoArg, (caddr_t) "on"}, - {(char *) "+solidmoebius", (char *) ".moebius.solidmoebius", XrmoptionNoArg, (caddr_t) "off"}, - {(char *) "-noants", (char *) ".moebius.noants", XrmoptionNoArg, (caddr_t) "on"}, - {(char *) "+noants", (char *) ".moebius.noants", XrmoptionNoArg, (caddr_t) "off"} + {"-solidmoebius", ".moebius.solidmoebius", XrmoptionNoArg, "on"}, + {"+solidmoebius", ".moebius.solidmoebius", XrmoptionNoArg, "off"}, + {"-noants", ".moebius.noants", XrmoptionNoArg, "on"}, + {"+noants", ".moebius.noants", XrmoptionNoArg, "off"} }; static argtype vars[] = { @@ -128,8 +127,8 @@ static argtype vars[] = }; static OptionStruct desc[] = { - {(char *) "-/+solidmoebius", (char *) "select between a SOLID or a NET Moebius Strip"}, - {(char *) "-/+noants", (char *) "turn on/off walking ants"} + {"-/+solidmoebius", "select between a SOLID or a NET Moebius Strip"}, + {"-/+noants", "turn on/off walking ants"} }; ModeSpecOpt moebius_opts = @@ -643,7 +642,7 @@ moebius_handle_event (ModeInfo *mi, XEvent *event) moebiusstruct *mp = &moebius[MI_SCREEN(mi)]; if (event->xany.type == ButtonPress && - event->xbutton.button & Button1) + event->xbutton.button == Button1) { mp->button_down_p = True; gltrackball_start (mp->trackball, @@ -652,11 +651,19 @@ moebius_handle_event (ModeInfo *mi, XEvent *event) return True; } else if (event->xany.type == ButtonRelease && - event->xbutton.button & Button1) + event->xbutton.button == Button1) { mp->button_down_p = False; return True; } + else if (event->xany.type == ButtonPress && + (event->xbutton.button == Button4 || + event->xbutton.button == Button5)) + { + gltrackball_mousewheel (mp->trackball, event->xbutton.button, 10, + !!event->xbutton.state); + return True; + } else if (event->xany.type == MotionNotify && mp->button_down_p) {