From http://www.jwz.org/xscreensaver/xscreensaver-5.39.tar.gz
[xscreensaver] / hacks / testx11.c
index 7932a3736fb483c7b98705c875cf19a761d502bf..17732d7b6fe9552a3378f44f2382125be135098f 100644 (file)
@@ -19,6 +19,9 @@
 #include "colorbars.h"
 #include "erase.h"
 
+#include "ximage-loader.h"
+#include "images/gen/logo-180_png.h"
+
 #include <assert.h>
 #include <errno.h>
 
@@ -219,8 +222,15 @@ make_clip_mask (struct testx11 *st)
 static void
 colorbars (struct testx11 *st)
 {
+  Pixmap logo_mask = 0;
+  Pixmap logo = image_data_to_pixmap (st->dpy, st->win,
+                                      logo_180_png, sizeof(logo_180_png),
+                                      0, 0, &logo_mask);
   draw_colorbars (st->xgwa.screen, st->xgwa.visual, st->win,
-                  st->xgwa.colormap, 0, 0, st->xgwa.width, st->xgwa.height);
+                  st->xgwa.colormap, 0, 0, st->xgwa.width, st->xgwa.height,
+                  logo, logo_mask);
+  XFreePixmap (st->dpy, logo);
+  XFreePixmap (st->dpy, logo_mask);
 }
 
 
@@ -341,6 +351,8 @@ testx11_init (Display *dpy, Window win)
 
   toggle_antialiasing (st);
 
+  st->erase = NULL;
+
   jwxyz_assert_display (dpy);
 
   st->rot = make_rotator (2, 2, 2, 2, 0.01, False);