From 29d8b0c3a84ed876ba0f205f01123e441e611577 Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Fri, 4 Dec 2020 02:27:35 +0100 Subject: [PATCH] resetwin(1,1,1) instead of resetwin(1,1,0) in preview_window so save_pixmap is reset to correct size when switching back to main window --- src/xinit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xinit.c b/src/xinit.c index c9fd799e..021fd13f 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -891,7 +891,7 @@ void preview_window(const char *what, const char *tk_win_path, const char *filen preview_xctx->window = pre_window; resetwin(1, 0, 1); /* create preview pixmap. resetwin(create_pixmap, clear_pixmap, force) */ } - resetwin(1, 1, 0); /* handle resize. resetwin(create_pixmap, clear_pixmap, force) */ + resetwin(1, 1, 1); /* handle resize. resetwin(create_pixmap, clear_pixmap, force) */ zoom_full(1, 0); /* draw */ xctx = save_xctx; } @@ -906,7 +906,7 @@ void preview_window(const char *what, const char *tk_win_path, const char *filen my_free(1144, ¤t_file); xctx = save_xctx; /* restore schematic */ save_xctx = NULL; - XSetTile(display,gctiled, xctx->save_pixmap); + resetwin(1, 1, 1); /* handle resize. resetwin(create_pixmap, clear_pixmap, force) */ set_modify(xctx->modified); } }