commit 421e8c9521acc4116ce069af6481f9073aa16992
parent 68745d092199c208ae1a09b07c47cf2a024d84a8
Author: Kyle Milz <krwmilz@gmail.com>
Date: Thu, 16 Sep 2021 07:49:41 +0000
move backing store checking closer to its only consumer
Diffstat:
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/events.c b/events.c
@@ -1834,6 +1834,10 @@ redraw_page()
dvi_file_ready = True;
+ XWindowAttributes attrs;
+ XGetWindowAttributes(DISP, mane.win, &attrs);
+ int backing_store = attrs.backing_store;
+
XClearWindow(DISP, mane.win);
if (backing_store != NotUseful) {
mane.min_x = mane.min_y = 0;
diff --git a/xdvi.c b/xdvi.c
@@ -925,10 +925,6 @@ main(int argc, char **argv)
wattrs.backing_store = WhenMapped;
XChangeWindowAttributes(DISP, mane.win, CWBackingStore, &wattrs);
- XWindowAttributes attrs;
- (void) XGetWindowAttributes(DISP, mane.win, &attrs);
- backing_store = attrs.backing_store;
-
image = XCreateImage(DISP, CopyFromParent, 1, XYBitmap, 0,
(char *) NULL, 0, 0, BMBITS, 0);
image->bitmap_unit = BMBITS;
diff --git a/xdvi.h b/xdvi.h
@@ -150,7 +150,6 @@ Boolean dvi_file_ready = False;
int bak_shrink; /* last shrink factor != 1 */
XImage *image;
-int backing_store;
Display *DISP;
Screen *SCRN;