From http://www.jwz.org/xscreensaver/xscreensaver-5.27.tar.gz
[xscreensaver] / hacks / maze.c
index 811aca31f6786bca6b7c62149da893c90e0d4fac..10704fa77f90f852440a3e3cbb6afe17b70adb51 100644 (file)
 #include  <stdio.h>
 
 /* #include  <X11/bitmaps/gray1> */
+/*
 #define gray1_width  2
 #define gray1_height 2
 static const char gray1_bits[] = { 0x01, 0x02 };
-
+*/
 
 #define MAX_MAZE_SIZE_X        1000
 #define MAX_MAZE_SIZE_Y        1000
@@ -1477,7 +1478,7 @@ maze_init (Display *dpy_arg, Window window_arg)
     st->logo_map = xscreensaver_logo (xgwa.screen, xgwa.visual, st->window,
                                       xgwa.colormap, bg,
                                       &pixels, &npixels, &logo_mask,
-                                      xgwa.width > 800);
+                                      xgwa.width > 800 || xgwa.height > 800);
     if (logo_mask) {
       XSetClipMask (st->dpy, st->logo_gc, logo_mask);
       XFreePixmap (st->dpy, logo_mask);
@@ -1588,6 +1589,9 @@ maze_draw (Display *dpy, Window window, void *closure)
         st->stop = 0;
         st->state = 1;
 
+        if (st->solve_state && st->solve_state->running)
+          st->solve_state->running = 0;
+
         st->sync_p = ((random() % 4) != 0);
 
         size = get_integer_resource (st->dpy, "gridSize", "Dimension");