]> asedeno.scripts.mit.edu Git - git.git/commitdiff
git-gui: Fix window manager problems on ion3
authorShawn O. Pearce <spearce@spearce.org>
Mon, 20 Aug 2007 04:53:04 +0000 (00:53 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Mon, 20 Aug 2007 04:38:13 +0000 (00:38 -0400)
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>
git-gui.sh
lib/class.tcl

index 29a790e481b8b309f1553449e1eb107745eaff6d..2686c1b8f0f176bc2888d4bb75900d3475bffb01 100755 (executable)
@@ -1936,6 +1936,12 @@ if {$browser ne {}} {
 }
 unset browser doc_path doc_url
 
+set root_exists 0
+bind . <Visibility> {
+       bind . <Visibility> {}
+       set root_exists 1
+}
+
 # -- Standard bindings
 #
 wm protocol . WM_DELETE_WINDOW do_quit
index 24e8cecea46d3da6d94b04917a2776e541c234f3..dc2141192a21e7416268cc94beda78d6ceb8f86f 100644 (file)
@@ -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 {}