X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fxlyap.c;h=2d43ce98450424b2c04f51b033c24efd174ef335;hb=78add6e627ee5f10e1fa6f3852602ea5066eee5a;hp=f12b354775e4ac75ad2dc8f45ca68d8672eef57b;hpb=4ade52359b6eba3621566dac79793a33aa4c915f;p=xscreensaver diff --git a/hacks/xlyap.c b/hacks/xlyap.c index f12b3547..2d43ce98 100644 --- a/hacks/xlyap.c +++ b/hacks/xlyap.c @@ -43,13 +43,14 @@ #undef countof #define countof(x) (sizeof((x))/sizeof((*x))) -#ifndef HAVE_COCOA +#ifndef HAVE_JWXYZ # include #endif static const char *xlyap_defaults [] = { ".background: black", ".foreground: white", + ".lowrez: true", "*fpsSolid: true", "*randomize: true", "*builtin: -1", @@ -78,7 +79,7 @@ static const char *xlyap_defaults [] = { "*delay: 10000", "*linger: 5", "*colors: 200", -#ifdef USE_IPHONE +#ifdef HAVE_MOBILE "*ignoreRotation: True", #endif 0 @@ -161,7 +162,7 @@ typedef struct { #endif typedef struct { -# ifndef HAVE_COCOA +# ifndef HAVE_JWXYZ Cursor band_cursor; # endif double p_min, p_max, q_min, q_max; @@ -827,7 +828,7 @@ Getkey(struct state *st, XKeyEvent *event) unsigned char key; int i; if (XLookupString(event, (char *)&key, sizeof(key), (KeySym *)0, - (XComposeStatus *) 0) > 0) + (XComposeStatus *) 0) > 0) { if (st->reset_countdown) st->reset_countdown = st->linger; @@ -956,6 +957,7 @@ Getkey(struct state *st, XKeyEvent *event) case 'H': print_help(st); return True; default: return False; } + } return False; } @@ -1877,11 +1879,13 @@ static Bool xlyap_event (Display *dpy, Window window, void *closure, XEvent *event) { struct state *st = (struct state *) closure; + switch(event->type) { case KeyPress: - return Getkey(st, &event->xkey); - return True; + if (Getkey(st, &event->xkey)) + return True; + break; #if 0 case ButtonPress: StartRubberBand(st, &st->rubber_data, event); @@ -1896,6 +1900,13 @@ xlyap_event (Display *dpy, Window window, void *closure, XEvent *event) default: break; } + + if (screenhack_event_helper (dpy, window, event)) + { + Clear(st); + return True; + } + return False; }