some other fixes for set_geom

This commit is contained in:
stefan schippers 2025-09-26 03:05:34 +02:00
parent ee7e3a965e
commit f6620bf6b2
2 changed files with 5 additions and 2 deletions

View File

@ -1686,7 +1686,7 @@ static void create_new_window(int *window_count, const char *win_path, const cha
}
if(has_x) {
tclvareval("toplevel ", toppath, " -bg {} -width 400 -height 400 -takefocus 0", NULL);
tclvareval("set_geom ", toppath, " [abs_sym_path {", fname, "}]", NULL);
tclvareval("set_geom ", toppath, " [abs_sym_path {", fname ? fname : "untitled.sch", "}]", NULL);
tclvareval("build_widgets ", toppath, NULL);
tclvareval("pack_widgets ", toppath, NULL);
Tk_MakeWindowExist(Tk_NameToWindow(interp, window_path[n], mainwindow));
@ -3224,6 +3224,9 @@ int Tcl_AppInit(Tcl_Interp *inter)
/* */
tcleval("update; eval_user_startup_commands");
/* set icon */
if(has_x) windowid(".");
/* source tcl file given on command line with --script */
if(cli_opt_tcl_script[0]) {
/* can not use tclvareval() here because if script contains 'exit'

View File

@ -10609,7 +10609,7 @@ if { ( $OS== "Windows" || [string length [lindex [array get env DISPLAY] 1] ] >
set_replace_key_binding
# update
xschem windowid . ;# set icon for window
# xschem windowid . ;# set icon for window
} ;# end if {[exists has_x]}
# read custom colors