summaryrefslogtreecommitdiffstats
path: root/hacks/petri.c
diff options
context:
space:
mode:
authorSimon Rettberg2019-02-18 11:55:41 +0100
committerSimon Rettberg2019-02-18 11:55:41 +0100
commitae69a754244c4e475c8d2591772ca8e005071d83 (patch)
tree58b3fa7abc2dcfe3c23e1c0ce108950c720826ab /hacks/petri.c
parentUpdate gitignore (diff)
downloadxscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.tar.gz
xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.tar.xz
xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.zip
Update to 5.42
Diffstat (limited to 'hacks/petri.c')
-rw-r--r--hacks/petri.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/hacks/petri.c b/hacks/petri.c
index 97299d6..e97c582 100644
--- a/hacks/petri.c
+++ b/hacks/petri.c
@@ -419,7 +419,7 @@ setup_display (struct state *st)
if (osize != cell_size)
{
- if (!st->warned)
+ if (0 && !st->warned)
{
fprintf (stderr,
"%s: throttling cell size from %d to %d because of %dM limit.\n",
@@ -707,11 +707,19 @@ static void
petri_free (Display *dpy, Window window, void *closure)
{
struct state *st = (struct state *) closure;
+ if (st->arr) free (st->arr);
+ if (st->head) free (st->head);
+ if (st->tail) free (st->tail);
+ if (st->coloredGCs) {
+ int i;
+ for (i = 0; i < st->count*2; i++)
+ XFreeGC (st->dpy, st->coloredGCs[i]);
+ free (st->coloredGCs);
+ }
free (st);
}
-
static const char *petri_defaults [] = {
".background: black",
".foreground: white",