Skip to content

Commit

Permalink
git-gui: Paper bag fix error dialogs opening over the main window
Browse files Browse the repository at this point in the history
If the main window is the only toplevel we have open then we
don't have a valid grab right now, so we need to assume the
best toplevel to use for the parent is ".".

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
Shawn O. Pearce committed Feb 22, 2008
1 parent aba15f7 commit 85ec3e7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/error.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
# Copyright (C) 2006, 2007 Shawn Pearce

proc _error_parent {} {
return [grab current .]
set p [grab current .]
if {$p eq {}} {
return .
}
return $p
}

proc error_popup {msg} {
Expand Down

0 comments on commit 85ec3e7

Please sign in to comment.