Merge branch 'jp/send-email-cc'
[gitweb.git] / git-gui / lib / error.tcl
index d0253ae2ffa72e491784434ff6ad98ed675ff10c..16a22187b26760963069bef14673b1791b311c12 100644 (file)
@@ -51,12 +51,15 @@ proc ask_popup {msg} {
        if {[reponame] ne {}} {
                append title " ([reponame])"
        }
-       return [tk_messageBox \
-               -parent . \
+       set cmd [list tk_messageBox \
                -icon question \
                -type yesno \
                -title $title \
                -message $msg]
+       if {[winfo ismapped .]} {
+               lappend cmd -parent .
+       }
+       eval $cmd
 }
 
 proc hook_failed_popup {hook msg} {