X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fhexadrop.c;h=515cb4cd4e05455e3bd75669ce920c28963074e5;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=dc1015a701adf0a4f0f54d68fc4d177c82957b11;hpb=2762a7d7cf8d83e68b8f635941f6609119d630ae;p=xscreensaver diff --git a/hacks/hexadrop.c b/hacks/hexadrop.c index dc1015a7..515cb4cd 100644 --- a/hacks/hexadrop.c +++ b/hacks/hexadrop.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1999-2013 Jamie Zawinski +/* xscreensaver, Copyright (c) 1999-2014 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -56,7 +56,6 @@ make_cells (state *st) int size, r, gw, gh, x, y, i; double th = 0; - grid_size = get_integer_resource (st->dpy, "size", "Size"); if (grid_size < 5) grid_size = 5; size = ((st->xgwa.width > st->xgwa.height @@ -359,21 +358,8 @@ static Bool hexadrop_event (Display *dpy, Window window, void *closure, XEvent *event) { state *st = (state *) closure; - Bool bonkp = False; - - if (event->type == ButtonPress) - bonkp = True; - else if (event->type == KeyPress) - { - KeySym keysym; - char c = 0; - XLookupString (&event->xkey, &c, 1, &keysym, 0); - if (c == ' ' || c == '\t' || c == '\r' || c == '\n') - bonkp = True; - } - - if (bonkp) + if (screenhack_event_helper (dpy, window, event)) { cell *c = st->cells; st->cells = 0; @@ -399,7 +385,7 @@ static const char *hexadrop_defaults [] = { "*ncolors: 128", "*uniform: Maybe", "*lockstep: Maybe", -#ifdef USE_IPHONE +#ifdef HAVE_MOBILE "*ignoreRotation: True", #endif 0