summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/class.tcl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/class.tcl b/lib/class.tcl
index 24e8cecea4..dc2141192a 100644
--- a/lib/class.tcl
+++ b/lib/class.tcl
@@ -148,11 +148,12 @@ proc make_toplevel {t w args} {
}
}
- if {[winfo ismapped .]} {
+ if {$::root_exists || [winfo ismapped .]} {
regsub -all {::} $this {__} w
set top .$w
set pfx $top
toplevel $top
+ set ::root_exists 1
} else {
set top .
set pfx {}