diff --git a/git-gui.sh b/git-gui.sh index 29a790e48..2686c1b8f 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -1936,6 +1936,12 @@ if {$browser ne {}} { } unset browser doc_path doc_url +set root_exists 0 +bind . { + bind . {} + set root_exists 1 +} + # -- Standard bindings # wm protocol . WM_DELETE_WINDOW do_quit diff --git a/lib/class.tcl b/lib/class.tcl index 24e8cecea..dc2141192 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 {}