Skip to content

Commit

Permalink
git-gui: Fix window manager problems on ion3
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn O. Pearce committed Aug 20, 2007
1 parent 51b8c50 commit c6951dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion lib/class.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Expand Down

0 comments on commit c6951dd

Please sign in to comment.