From http://www.jwz.org/xscreensaver/xscreensaver-5.21.tar.gz
[xscreensaver] / hacks / noseguy.c
index 108db35c512200f16094aadb2bcfdcb594bfd36d..c0691b3ab8e224405236f2566ba9b8952c098f70 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1992-2012 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1992-2013 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -483,11 +483,11 @@ fill_words (struct state *st)
   while (p < st->words + sizeof(st->words) - 1 &&
          st->lines < MAXLINES)
     {
-      char c = textclient_getc (st->tc);
+      int c = textclient_getc (st->tc);
       if (c == '\n')
         st->lines++;
       if (c > 0)
-        *p++ = c;
+        *p++ = (char) c;
       else
         break;
     }
@@ -600,6 +600,9 @@ static void
 noseguy_reshape (Display *dpy, Window window, void *closure, 
                  unsigned int w, unsigned int h)
 {
+  struct state *st = (struct state *) closure;
+  st->Width = w + 2;
+  st->Height = h + 2;
 }
 
 static Bool