X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Ft3d.c;h=6a7e0cdec898a4a88dca2d7bb758fe7fd08a2956;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=cbd815cdd8d04942c4fe3409699af83eefbf934e;hpb=c1b9b55ad8d59dc05ef55e316aebf5863e7dfa56;p=xscreensaver diff --git a/hacks/t3d.c b/hacks/t3d.c index cbd815cd..6a7e0cde 100644 --- a/hacks/t3d.c +++ b/hacks/t3d.c @@ -13,10 +13,10 @@ of the command-line options provided by screenhack.c. */ -#ifndef HAVE_COCOA +#ifndef HAVE_JWXYZ # define FASTDRAW # define FASTCOPY -#endif /* !HAVE_COCOA */ +#endif /* !HAVE_JWXYZ */ #include #include @@ -325,7 +325,7 @@ initialize (struct state *st) st->planes=st->xgwa.depth; -#ifdef HAVE_COCOA +#ifdef HAVE_JWXYZ # define GXandInverted GXcopy /* #### this can't be right, right? */ #endif st->gc = XCreateGC (st->dpy, st->window, 0, xgc); @@ -563,10 +563,15 @@ fill_kugel(struct state *st, int i, Pixmap buf, int setcol) else if(-ra<40.0) inc=2; if(setcol) { - if (m==27) col=33; + if (m==27) + col=33; else col=(int)(m); - if (col>33) col=33; col/=3; + + if (col>33) + col=33; + + col/=3; setink(st->colors[col].pixel); } @@ -895,8 +900,9 @@ t3d_event (Display *dpy, Window window, void *closure, XEvent *event) struct state *st = (struct state *) closure; if (event->type == KeyPress) { - KeySym kpr=XKeycodeToKeysym(st->dpy,event->xkey.keycode,0); - + KeySym keysym; + char kpr = 0; + XLookupString (&event->xkey, &kpr, 1, &keysym, 0); switch (kpr) { case 's': case 'S':