X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fhexadrop.c;fp=hacks%2Fhexadrop.c;h=dc1015a701adf0a4f0f54d68fc4d177c82957b11;hp=dd8bfeeac8e7fca5e4aa01b59389ca8a0851d794;hb=2762a7d7cf8d83e68b8f635941f6609119d630ae;hpb=4ade52359b6eba3621566dac79793a33aa4c915f diff --git a/hacks/hexadrop.c b/hacks/hexadrop.c index dd8bfeea..dc1015a7 100644 --- a/hacks/hexadrop.c +++ b/hacks/hexadrop.c @@ -359,8 +359,21 @@ static Bool hexadrop_event (Display *dpy, Window window, void *closure, XEvent *event) { state *st = (state *) closure; + Bool bonkp = False; - if (event->type == ButtonPress || event->type == KeyPress) + + 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) { cell *c = st->cells; st->cells = 0;