summaryrefslogtreecommitdiff
path: root/gdb/gdbtk
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2002-02-14 02:39:14 +0000
committerKeith Seitz <keiths@redhat.com>2002-02-14 02:39:14 +0000
commit32eb99e5b7b3259c026244b438dda90d801d7f92 (patch)
tree343c1937c5f02f8542eb074d14812be572a0dc28 /gdb/gdbtk
parentc54f1bd03148f396f472f9a54efa7b2f9cc56110 (diff)
downloadgdb-32eb99e5b7b3259c026244b438dda90d801d7f92.tar.gz
* library/managedwin.itb (_create): If given a transient window,
make sure that the SrcWin that is to become its master exists; otherwise, use ".".
Diffstat (limited to 'gdb/gdbtk')
-rw-r--r--gdb/gdbtk/ChangeLog6
-rw-r--r--gdb/gdbtk/library/managedwin.itb12
2 files changed, 17 insertions, 1 deletions
diff --git a/gdb/gdbtk/ChangeLog b/gdb/gdbtk/ChangeLog
index aad3007f587..473410b2bd3 100644
--- a/gdb/gdbtk/ChangeLog
+++ b/gdb/gdbtk/ChangeLog
@@ -1,3 +1,9 @@
+2002-02-13 Keith Seitz <keiths@redhat.com>
+
+ * library/managedwin.itb (_create): If given a transient window,
+ make sure that the SrcWin that is to become its master exists;
+ otherwise, use ".".
+
2002-02-12 Keith Seitz <keiths@redhat.com>
From Don Bowman <don@sandvine.com>:
diff --git a/gdb/gdbtk/library/managedwin.itb b/gdb/gdbtk/library/managedwin.itb
index 53d3d42581e..59a2cbd9a5a 100644
--- a/gdb/gdbtk/library/managedwin.itb
+++ b/gdb/gdbtk/library/managedwin.itb
@@ -255,7 +255,17 @@ body ManagedWin::_create { class args } {
if {$transient} {
wm resizable $top 0 0
- wm transient $top [winfo toplevel [namespace tail [lindex [ManagedWin::find SrcWin] 0]]]
+
+ # If a SrcWin is around, use its toplevel as the master for
+ # the transient. Otherwise use ".". (The splash screen will
+ # need ".", for example.)
+ set srcs [ManagedWin::find SrcWin]
+ if {[llength $srcs] > 0} {
+ set w [winfo toplevel [namespace tail [lindex $srcs 0]]]
+ } else {
+ set w .
+ }
+ wm transient $top $w
} elseif {$::tcl_platform(platform) == "unix"} {
# Modal dialogs DONT get Icons...
if {[pref get gdb/use_icons] && ![$newwin isa ModalDialog]} {