From http://www.jwz.org/xscreensaver/xscreensaver-5.35.tar.gz
[xscreensaver] / hacks / penetrate.c
index 2196035f3cee476cd84eb5187b279035621b0d3e..b2b17e3b4383834f086161719330d4feec77dbda 100644 (file)
@@ -172,10 +172,11 @@ static void launch (struct state *st, int xlim, int ylim, int src)
   m->splits = 0;
   if (m->jenis < 50) {
     int j = ylim * 0.4;
-    if (j)
+    if (j) {
         m->splits = random() % j;
         if (m->splits < ylim * 0.08)
                m->splits = 0;
+    }
   }
 
   /* special if we're from another missile */
@@ -366,7 +367,7 @@ penetrate_init (Display *dpy, Window window)
   struct state *st = (struct state *) calloc (1, sizeof(*st));
   int i;
   const char *levelfont = "-*-courier-*-r-*-*-*-380-*-*-*-*-*-*";
-  const char *scorefont = "-*-times-*-r-*-*-*-180-*-*-*-*-*-*";
+  const char *scorefont = "-*-helvetica-*-r-*-*-*-180-*-*-*-*-*-*";
   XGCValues gcv;
   XWindowAttributes xgwa;
 
@@ -436,7 +437,7 @@ penetrate_init (Display *dpy, Window window)
   gcv.foreground = get_pixel_resource(st->dpy, st->cmap, "background", "Background");
   st->erase_gc = XCreateGC(st->dpy, st->window, GCForeground, &gcv);
 
-# ifdef HAVE_COCOA
+# ifdef HAVE_JWXYZ
   jwxyz_XSetAntiAliasing (st->dpy, st->erase_gc, False);
   jwxyz_XSetAntiAliasing (st->dpy, st->draw_gc, False);
 # endif
@@ -949,6 +950,7 @@ static void
 penetrate_reshape (Display *dpy, Window window, void *closure, 
                  unsigned int w, unsigned int h)
 {
+  XClearWindow (dpy, window);
 }
 
 static Bool
@@ -968,10 +970,11 @@ penetrate_free (Display *dpy, Window window, void *closure)
 static const char *penetrate_defaults [] = {
   ".background:        black",
   ".foreground:        white",
+  "*fpsTop:    true",
+  "*fpsSolid:  true",
   "*bgrowth:   5",
   "*lrate:     80",
   "*smart:     False",
-  "*geometry:  800x500",
   0
 };