commit 5e14078a48903b1d1a05735fa8d6c6cb4b03a432
parent 0aaad1b23ab7b71807ccd013216f936017d72286
Author: Kyle Milz <krwmilz@gmail.com>
Date: Wed, 15 Sep 2021 20:36:44 +0000
use CopyFromParent to not store current visual
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/xdvi.c b/xdvi.c
@@ -698,12 +698,11 @@ main(int argc, char **argv)
printf("Atom(%s) = %lu\n", atom_names[i], atoms[i]);
}
- Visual *visual = DefaultVisualOfScreen(SCRN);
Colormap colormap = DefaultColormapOfScreen(SCRN);
if (DefaultDepthOfScreen(SCRN) < 24)
errx(1, "X depth < 24 is not supported.");
- if (visual->class != TrueColor)
+ if (DefaultVisualOfScreen(SCRN)->class != TrueColor)
errx(1, "X visual not 'TrueColor' is not supported.");
/*
@@ -986,7 +985,7 @@ main(int argc, char **argv)
(void) XGetWindowAttributes(DISP, mane.win, &attrs);
backing_store = attrs.backing_store;
- image = XCreateImage(DISP, visual, 1, XYBitmap, 0,
+ image = XCreateImage(DISP, CopyFromParent, 1, XYBitmap, 0,
(char *) NULL, 0, 0, BMBITS, 0);
image->bitmap_unit = BMBITS;
#ifdef WORDS_BIGENDIAN