@matheusbsbs / matheus-bagliano / commits / 85ec3e7778
Fork 0

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>

Shawn O. Pearce committed Feb 21, 2008 at 12:22 UTC 85ec3e7778c09f5d4f52a29f57c5ecc64070ffd1
1 file changed +5 -1
lib/error.tcl
+5 -1
@@ -2,7 +2,11 @@
2 # Copyright (C) 2006, 2007 Shawn Pearce
3
4 proc _error_parent {} {
5 - return [grab current .]
5 + set p [grab current .]
6 + if {$p eq {}} {
7 + return .
8 + }
9 + return $p
10 }
11
12 proc error_popup {msg} {