summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2008-02-21 17:22:08 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2008-02-22 06:35:23 (GMT)
commit85ec3e7778c09f5d4f52a29f57c5ecc64070ffd1 (patch)
tree0cea6fb82109be7aa0e5c3c89438de4485560267 /lib
parentaba15f7f592c302196401d17a42c772d744555b4 (diff)
downloadgit-85ec3e7778c09f5d4f52a29f57c5ecc64070ffd1.zip
git-85ec3e7778c09f5d4f52a29f57c5ecc64070ffd1.tar.gz
git-85ec3e7778c09f5d4f52a29f57c5ecc64070ffd1.tar.bz2
git-gui: Paper bag fix error dialogs opening over the main window
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/error.tcl6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/error.tcl b/lib/error.tcl
index 45800d5..08a2462 100644
--- a/lib/error.tcl
+++ b/lib/error.tcl
@@ -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} {