- fg = get_pixel_resource("foreground", "Foreground", dpy, cmap);
- bg = get_pixel_resource("background", "Background", dpy, cmap);
-
- delay = get_integer_resource("delay", "Integer");
- if (delay < 1)
- delay = 1;
- pixwidth = get_integer_resource("pixwidth", "Integer");
- if (pixwidth < 1)
- pixwidth = 1;
- pixheight = get_integer_resource("pixheight", "Integer");
- if (pixheight < 1)
- pixheight = 1;
- pixspacex = get_integer_resource("pixspacex", "Integer");
- if (pixspacex < 0)
- pixspacex = 0;
- pixspacey = get_integer_resource("pixspacey", "Integer");
- if (pixspacey < 0)
- pixspacey = 0;
- lenses = get_boolean_resource("lenses", "Boolean");
- lensoffsetx = get_integer_resource("lensoffsetx", "Integer");
- lensoffsetx = MAX(0, MIN(pixwidth, lensoffsetx));
- lensoffsety = get_integer_resource("lensoffsety", "Integer");
- lensoffsety = MAX(0, MIN(pixwidth, lensoffsety));
+ fg = get_pixel_resource(st->dpy, cmap, "foreground", "Foreground");
+ bg = get_pixel_resource(st->dpy, cmap, "background", "Background");
+
+ st->delay = get_integer_resource(st->dpy, "delay", "Integer");
+ if (st->delay < 1)
+ st->delay = 1;
+ st->duration = get_integer_resource (st->dpy, "duration", "Seconds");
+ if (st->duration < 1)
+ st->duration = 1;
+ st->pixwidth = get_integer_resource(st->dpy, "pixwidth", "Integer");
+ if (st->pixwidth < 1)
+ st->pixwidth = 1;
+ st->pixheight = get_integer_resource(st->dpy, "pixheight", "Integer");
+ if (st->pixheight < 1)
+ st->pixheight = 1;
+ st->pixspacex = get_integer_resource(st->dpy, "pixspacex", "Integer");
+ if (st->pixspacex < 0)
+ st->pixspacex = 0;
+ st->pixspacey = get_integer_resource(st->dpy, "pixspacey", "Integer");
+ if (st->pixspacey < 0)
+ st->pixspacey = 0;
+ st->lenses = get_boolean_resource(st->dpy, "lenses", "Boolean");
+ st->lensoffsetx = get_integer_resource(st->dpy, "lensoffsetx", "Integer");
+ st->lensoffsetx = MAX(0, MIN(st->pixwidth, st->lensoffsetx));
+ st->lensoffsety = get_integer_resource(st->dpy, "lensoffsety", "Integer");
+ st->lensoffsety = MAX(0, MIN(st->pixwidth, st->lensoffsety));