@matheusbsbs / matheus-bagliano / commits / c6951ddb52
Fork 0

git-gui: Fix window manager problems on ion3

cehteh on #git noticed that secondary windows such as console windows from push/fetch/merge or the blame browser failed on ion when we tried to open them a second time. The issue turned out to be the fact that on ion [winfo ismapped .] returns false if . is not visible right now because it has been obscured by another window in the same panel. So we need to keep track of whether or not the root window has been displayed for this application, and once it has been we cannot ever assume that ismapped is going to return true. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Aug 20, 2007 at 00:53 UTC c6951ddb522a7d8ee0fc371cf9c37e727e676989
2 files changed +8 -1
git-gui.sh
+6
@@ -1936,6 +1936,12 @@ if {$browser ne {}} {
1936 }
1937 unset browser doc_path doc_url
1938
1939 +set root_exists 0
1940 +bind . <Visibility> {
1941 + bind . <Visibility> {}
1942 + set root_exists 1
1943 +}
1944 +
1945 # -- Standard bindings
1946 #
1947 wm protocol . WM_DELETE_WINDOW do_quit
lib/class.tcl
+2 -1
@@ -148,11 +148,12 @@ proc make_toplevel {t w args} {
148 }
149 }
150
151 - if {[winfo ismapped .]} {
151 + if {$::root_exists || [winfo ismapped .]} {
152 regsub -all {::} $this {__} w
153 set top .$w
154 set pfx $top
155 toplevel $top
156 + set ::root_exists 1
157 } else {
158 set top .
159 set pfx {}