diff options
author | ericm <ericm> | 2000-04-10 23:19:58 (GMT) |
---|---|---|
committer | ericm <ericm> | 2000-04-10 23:19:58 (GMT) |
commit | e97f81ba5fd69a5c4c8b837322468959cb49e028 (patch) | |
tree | cdb643791803b9c130570b686270bbd40c1e38f8 /library | |
parent | d18c89755234173b73aa739b7a51e75618b6e534 (diff) | |
download | tk-e97f81ba5fd69a5c4c8b837322468959cb49e028.zip tk-e97f81ba5fd69a5c4c8b837322468959cb49e028.tar.gz tk-e97f81ba5fd69a5c4c8b837322468959cb49e028.tar.bz2 |
* library/bgerror.tcl: Added check for withdrawn state of . and
unsetting of transient bit for .bgerrorDialog if . is not
viewable; this protects against the application hanging on systems
like Windows, where transient windows are withdrawn with their
parents. [Bug: 4370].
Diffstat (limited to 'library')
-rw-r--r-- | library/bgerror.tcl | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/library/bgerror.tcl b/library/bgerror.tcl index 5f799c9..15f9448 100644 --- a/library/bgerror.tcl +++ b/library/bgerror.tcl @@ -4,7 +4,7 @@ # posts a dialog box with the error message and gives the user a chance # to see a more detailed stack trace. # -# RCS: @(#) $Id: bgerror.tcl,v 1.5 1999/04/16 01:51:25 stanton Exp $ +# RCS: @(#) $Id: bgerror.tcl,v 1.6 2000/04/10 23:19:58 ericm Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -23,6 +23,21 @@ proc bgerror err { global errorInfo tcl_platform + + # Normally, the bgerror dialog is made transient with respect to "." (due + # to the implementation of tk_dialog). On some systems (like Windows), + # when a window is withdraw or iconified, it's transient windows go with + # it. Unfortunately, there is also a grab on the dialog (again because of + # the implementation of tk_dialog). So if "." is withdrawn or iconified + # and the user gets a bgerror, the app will hang, for no apparent reason. + # + # One (somewhat hacky) way to address this is to un-transient the dialog + # if "." is withdrawn or iconified. + after idle { + if { ![winfo viewable .bgerrorDialog] } { + wm transient .bgerrorDialog {} + } + } # save errorInfo which would be erased in the catch below otherwise. set info $errorInfo ; |