- data = jwxyz_load_random_image (dpy, &width, &height, &name);
- if (! data)
- draw_colorbars (screen, xgwa.visual, drawable, xgwa.colormap,
- 0, 0, xgwa.width, xgwa.height);
- else
- {
- XImage *img = XCreateImage (dpy, xgwa.visual, 32,
- ZPixmap, 0, data, width, height, 0, 0);
- XGCValues gcv;
- GC gc;
- gcv.foreground = BlackPixelOfScreen (screen);
- gc = XCreateGC (dpy, drawable, GCForeground, &gcv);
- XFillRectangle (dpy, drawable, gc, 0, 0, xgwa.width, xgwa.height);
- XPutImage (dpy, drawable, gc, img, 0, 0,
- (xgwa.width - width) / 2,
- (xgwa.height - height) / 2,
- width, height);
- XDestroyImage (img);
- XFreeGC (dpy, gc);
- }
+ XGCValues gcv;
+ gcv.foreground = BlackPixelOfScreen (screen);
+ GC gc = XCreateGC (dpy, drawable, GCForeground, &gcv);
+ XFillRectangle (dpy, drawable, gc, 0, 0, xgwa.width, xgwa.height);
+ char *name = jwxyz_draw_random_image (dpy, drawable, gc);
+ if (! name) {
+ draw_colorbars (screen, xgwa.visual, drawable, xgwa.colormap, 0, 0,
+ xgwa.width, xgwa.height, 0, 0); /* #### logo missing */
+ }
+ XFreeGC (dpy, gc);