X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fhexadrop.c;h=d9a706c57de80959ec2b8bf7854c55eebf9dbfac;hp=dc1015a701adf0a4f0f54d68fc4d177c82957b11;hb=6afd6db0ae9396cd7ff897ade597cd5483f49b0e;hpb=dba664f31aa87285db4d76cf8c5e66335299703a diff --git a/hacks/hexadrop.c b/hacks/hexadrop.c index dc1015a7..d9a706c5 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 @@ -359,21 +359,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;