Skip to content

Commit 85ec3e7

Browse files
committed
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>
1 parent aba15f7 commit 85ec3e7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/error.tcl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
# Copyright (C) 2006, 2007 Shawn Pearce
33

44
proc _error_parent {} {
5-
return [grab current .]
5+
set p [grab current .]
6+
if {$p eq {}} {
7+
return .
8+
}
9+
return $p
610
}
711

812
proc error_popup {msg} {

0 commit comments

Comments
 (0)