summaryrefslogtreecommitdiffstats
path: root/library/xmfbox.tcl
diff options
context:
space:
mode:
authormdejong <mdejong>2002-06-12 23:08:11 (GMT)
committermdejong <mdejong>2002-06-12 23:08:11 (GMT)
commite8ad327a03841c59bf189200cd95a15f2be2ae4c (patch)
tree63c9432dfc34ae837dc633748cf0a09e8dcef2ea /library/xmfbox.tcl
parentedf1fd81b7f8764161cf92ec0303109f943accf5 (diff)
downloadtk-e8ad327a03841c59bf189200cd95a15f2be2ae4c.zip
tk-e8ad327a03841c59bf189200cd95a15f2be2ae4c.tar.gz
tk-e8ad327a03841c59bf189200cd95a15f2be2ae4c.tar.bz2
* library/choosedir.tcl (tk::dialog::file::chooseDir):
* library/clrpick.tcl (tk::dialog::color): * library/dialog.tcl (tk_dialog): * library/msgbox.tcl (tk::MessageBox): * library/tkfbox.tcl (tk::dialog::file): * library/xmfbox.tcl (tk::MotifFDialog_Create): Only make the dialog window a transient if the master is visible. This check already appeared in some of the dialogs. This patch just copies the check into those that were lacking.
Diffstat (limited to 'library/xmfbox.tcl')
-rw-r--r--library/xmfbox.tcl13
1 files changed, 11 insertions, 2 deletions
diff --git a/library/xmfbox.tcl b/library/xmfbox.tcl
index 4fec52c..53df5dc 100644
--- a/library/xmfbox.tcl
+++ b/library/xmfbox.tcl
@@ -4,7 +4,7 @@
# Unix platform. This implementation is used only if the
# "::tk_strictMotif" flag is set.
#
-# RCS: @(#) $Id: xmfbox.tcl,v 1.20 2002/06/10 00:15:42 a_kovalenko Exp $
+# RCS: @(#) $Id: xmfbox.tcl,v 1.21 2002/06/12 23:08:12 mdejong Exp $
#
# Copyright (c) 1996 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Scriptics Corporation
@@ -107,7 +107,16 @@ proc ::tk::MotifFDialog_Create {dataName type argList} {
}
MotifFDialog_SetListMode $w
- wm transient $w $data(-parent)
+ # Dialog boxes should be transient with respect to their parent,
+ # so that they will always stay on top of their parent window. However,
+ # some window managers will create the window as withdrawn if the parent
+ # window is withdrawn or iconified. Combined with the grab we put on the
+ # window, this can hang the entire application. Therefore we only make
+ # the dialog transient if the parent is viewable.
+
+ if {[winfo viewable [winfo toplevel $data(-parent)]] } {
+ wm transient $w $data(-parent)
+ }
MotifFDialog_FileTypes $w
MotifFDialog_Update $w