- if (!image)
- {
- image = XCreateImage (dpy, xgwa.visual,
- depth, ZPixmap, 0, /* depth, format, offset */
- 0, xgwa.width, 1, 8, 0); /* data, w, h, pad, bpl */
- image->data = (char *) calloc(image->height, image->bytes_per_line);
+ if (!st->draw_image)
+ {
+ st->draw_image = XCreateImage (st->dpy, st->xgwa.visual,
+ st->depth, ZPixmap, 0, /* depth, format, offset */
+ 0, st->xgwa.width, 1, 8, 0); /* data, w, h, pad, bpl */
+ st->draw_image->data = (char *) calloc(st->draw_image->height, st->draw_image->bytes_per_line);
+ }