From 0f3a0c62a89c88c4040a21c87a1a3b2afd4f8a40 Mon Sep 17 00:00:00 2001 From: Stefan Schippers Date: Fri, 23 Jun 2023 20:03:48 +0200 Subject: [PATCH] resetwin() do nor process pending_fullzoom if window size has not set by window manager (width ==1 || height ==1) --- src/xinit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xinit.c b/src/xinit.c index 1138a65c..1b023369 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -2071,8 +2071,10 @@ void resetwin(int create_pixmap, int clear_pixmap, int force, int w, int h) } if(xctx->pending_fullzoom > 0) { tcleval("winfo ismapped ."); - if(tclresult()[0] == '1') { - dbg(1, "resetwin(): pending_fulzoom: doing zoom_full()\n"); + /* if window unmapped or size has not been set by wm (width == 1 // height == 1) do not + * perform the pending full_zoom */ + if(tclresult()[0] == '1' && (width > 1 || height > 1) ) { + dbg(1, "resetwin(): window mapped, pending_fulzoom: doing zoom_full()\n"); zoom_full(1, 0, 1 + 2 * tclgetboolvar("zoom_full_center"), 0.97); xctx->pending_fullzoom--; }