summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--library/comdlg.tcl12
-rw-r--r--library/safetk.tcl11
2 files changed, 16 insertions, 7 deletions
diff --git a/library/comdlg.tcl b/library/comdlg.tcl
index 972a538..1ba0769 100644
--- a/library/comdlg.tcl
+++ b/library/comdlg.tcl
@@ -3,7 +3,7 @@
# Some functions needed for the common dialog boxes. Probably need to go
# in a different file.
#
-# RCS: @(#) $Id: comdlg.tcl,v 1.6 1999/12/07 03:04:43 hobbs Exp $
+# RCS: @(#) $Id: comdlg.tcl,v 1.7 2000/04/08 06:59:28 hobbs Exp $
#
# Copyright (c) 1996 Sun Microsystems, Inc.
#
@@ -201,6 +201,12 @@ proc tkFocusGroup_Destroy {t w} {
proc tkFocusGroup_In {t w detail} {
global tkPriv tkFocusIn
+ if {[string compare $detail NotifyNonlinear] && \
+ [string compare $detail NotifyNonlinearVirtual]} {
+ # This is caused by mouse moving out&in of the window *or*
+ # ordinary keypresses some window managers (ie: CDE [Bug: 2960]).
+ return
+ }
if {![info exists tkFocusIn($t,$w)]} {
set tkFocusIn($t,$w) ""
return
@@ -228,8 +234,8 @@ proc tkFocusGroup_In {t w detail} {
proc tkFocusGroup_Out {t w detail} {
global tkPriv tkFocusOut
- if {[string compare $detail NotifyNonlinear] &&
- [string compare $detail NotifyNonlinearVirtual]} {
+ if {[string compare $detail NotifyNonlinear] && \
+ [string compare $detail NotifyNonlinearVirtual]} {
# This is caused by mouse moving out of the window
return
}
diff --git a/library/safetk.tcl b/library/safetk.tcl
index e732932..b2e0c02 100644
--- a/library/safetk.tcl
+++ b/library/safetk.tcl
@@ -2,7 +2,7 @@
#
# Support procs to use Tk in safe interpreters.
#
-# RCS: @(#) $Id: safetk.tcl,v 1.5 1999/09/02 17:02:53 hobbs Exp $
+# RCS: @(#) $Id: safetk.tcl,v 1.6 2000/04/08 06:59:28 hobbs Exp $
#
# Copyright (c) 1997 Sun Microsystems, Inc.
#
@@ -185,12 +185,15 @@ proc ::safe::allowTk {interpPath argv} {
proc ::safe::disallowTk {interpPath} {
variable tkInit
- unset tkInit($interpPath)
- none
+ # This can already be deleted by the DeleteHook of the interp
+ if {[info exists tkInit($interpPath)]} {
+ unset tkInit($interpPath)
+ }
+ return
}
-# safe::disallowTk --
+# safe::tkDelete --
#
# Clean up the window associated with the interp being deleted.
#