When I execute the following code
#!/bin/sh
# \
exec wish "$0" ${1+"$@"}
set w .main
toplevel $w
wm title $w "FOO"
I got two windows instead one.
I tried to hide wish “.” window by :
wm state . withdrawn
but anyway when I close my toplevel window the main process still not finished.
My question is how to destroy wish window when I close toplevel window and completely finish the process?
If you only want 1 window, why not do your manipulations on the
.window?Then, when the user closes that window, your app will finish.