From 86dcb4cafa0fcfc426c566130d2453d7d7332a14 Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Sat, 9 Oct 2021 13:30:44 +0200 Subject: [PATCH] Do the update (process pending X events) only if a filename is given on cmdline, to avoid losing an Expose event if no file given --- src/xinit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xinit.c b/src/xinit.c index 471daa26..992faa2a 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -1549,7 +1549,7 @@ int Tcl_AppInit(Tcl_Interp *inter) /* Completing tk windows creation (see xschem.tcl, build_windows) and event binding */ /* *AFTER* X initialization done */ /* */ - if(has_x) tcleval("build_windows; update"); + if(has_x) tcleval("build_windows"); fullscreen=atoi(tclgetvar("fullscreen")); if(fullscreen) { @@ -1597,6 +1597,7 @@ int Tcl_AppInit(Tcl_Interp *inter) remove_symbols(); /* if do_netlist=1 call load_schematic with 'reset_undo=0' avoiding call to tcl is_xschem_file that could change netlist_type to symbol */ + tcleval("update"); load_schematic(1, f, !do_netlist); Tcl_VarEval(interp, "update_recent_file {", f, "}", NULL); } else if(!tcl_script[0]) {