+ st->max_width = xgwa.width;
+ st->max_height = xgwa.height;
+
+ st->delay = get_integer_resource (st->dpy, "delay", "Integer");
+ st->delay2 = get_integer_resource (st->dpy, "delay2", "Integer");
+ st->duration = get_integer_resource (st->dpy, "duration", "Seconds");
+ st->grid_size = get_integer_resource (st->dpy, "gridSize", "Integer");
+ st->pix_inc = get_integer_resource (st->dpy, "pixelIncrement", "Integer");
+
+ /* Don't let the grid be smaller than 5x5 */
+ while (st->grid_size > xgwa.width / 5)
+ st->grid_size /= 2;
+ while (st->grid_size > xgwa.height / 5)
+ st->grid_size /= 2;
+
+ if (st->delay < 0) st->delay = 0;
+ if (st->delay2 < 0) st->delay2 = 0;
+ if (st->duration < 1) st->duration = 1;
+ if (st->pix_inc < 1) st->pix_inc = 1;
+ if (st->grid_size < 1) st->grid_size = 1;