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

This commit is contained in:
Stefan Frederik 2021-10-09 13:30:44 +02:00
parent 4f8120cd2d
commit 86dcb4cafa
1 changed files with 2 additions and 1 deletions

View File

@ -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]) {