*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
- free_colors (st->dpy, st->xgwa.colormap, st->colors, st->ncolors);
+ free_colors (st->xgwa.screen, st->xgwa.colormap, st->colors, st->ncolors);
if (!st->done_once)
{
char *s = get_string_resource (st->dpy, "mode", "Mode");
if (!s || !*s || !strcasecmp (s, "random"))
if (!st->done_once)
{
char *s = get_string_resource (st->dpy, "mode", "Mode");
if (!s || !*s || !strcasecmp (s, "random"))
- make_smooth_colormap (st->dpy, st->xgwa.visual, st->xgwa.colormap,
+ if (st->ncolors < 1) st->ncolors = 1;
+ make_smooth_colormap (st->xgwa.screen, st->xgwa.visual, st->xgwa.colormap,
st->colors, &st->ncolors, True, 0, False);
st->colors, &st->ncolors, True, 0, False);
boxfit_event (Display *dpy, Window window, void *closure, XEvent *event)
{
state *st = (state *) closure;
boxfit_event (Display *dpy, Window window, void *closure, XEvent *event)
{
state *st = (state *) closure;
- if (event->xany.type == ButtonPress) {
- st->growing_p = !st->growing_p;
- return True;
- }
+ if (screenhack_event_helper (dpy, window, event))
+ {
+ st->growing_p = !st->growing_p;
+ return True;
+ }
"*peek: False",
"*grabDesktopImages: False", /* HAVE_COCOA */
"*chooseRandomImages: True", /* HAVE_COCOA */
"*peek: False",
"*grabDesktopImages: False", /* HAVE_COCOA */
"*chooseRandomImages: True", /* HAVE_COCOA */