summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorericm <ericm>2000-03-10 22:16:35 (GMT)
committerericm <ericm>2000-03-10 22:16:35 (GMT)
commit5ef22bb7e299c0f98f09b43e092cb85925b077b0 (patch)
tree5d8a87ffd7f1733a0d17827aa06c8aa65bb2a579
parent7877ebe805f8eb5114cc3780cee591569b79d2d7 (diff)
downloadtk-5ef22bb7e299c0f98f09b43e092cb85925b077b0.zip
tk-5ef22bb7e299c0f98f09b43e092cb85925b077b0.tar.gz
tk-5ef22bb7e299c0f98f09b43e092cb85925b077b0.tar.bz2
* library/menu.tcl: Applied patch from [Bug: 4155]; protects
against grabs on non-viewable windows.
-rw-r--r--ChangeLog11
-rw-r--r--library/menu.tcl11
2 files changed, 18 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 72e82fe..f65b6c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2000-03-10 Eric Melski <ericm@scriptics.com>
+
+ * library/menu.tcl: Applied patch from [Bug: 4155]; protects
+ against grabs on non-viewable windows.
+
+2000-03-08 Eric Melski <ericm@scriptics.com>
+
+ * tests/choosedir.test: Modified test 3.1 (-mustexist works) to be
+ more careful about cleaning up its potentially troublesome after
+ events.
+
2000-03-07 Eric Melski <ericm@scriptics.com>
* tests/button.test:
diff --git a/library/menu.tcl b/library/menu.tcl
index 409955d..00c0e4c 100644
--- a/library/menu.tcl
+++ b/library/menu.tcl
@@ -4,7 +4,7 @@
# It also implements keyboard traversal of menus and implements a few
# other utility procedures related to menus.
#
-# RCS: @(#) $Id: menu.tcl,v 1.9 2000/03/07 01:02:26 ericm Exp $
+# RCS: @(#) $Id: menu.tcl,v 1.10 2000/03/10 22:16:36 ericm Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -350,8 +350,10 @@ proc tkMbPost {w {x {}} {y {}}} {
set tkPriv(tearoff) $tearoff
if {$tearoff != 0} {
focus $menu
- tkSaveGrabInfo $w
- grab -global $w
+ if {[winfo viewable $w]} {
+ tkSaveGrabInfo $w
+ grab -global $w
+ }
}
}
@@ -561,7 +563,8 @@ proc tkMenuButtonDown menu {
return
}
$menu postcascade active
- if {[string compare $tkPriv(postedMb) ""]} {
+ if {[string compare $tkPriv(postedMb) ""] && \
+ [winfo viewable $tkPriv(postedMb)]} {
grab -global $tkPriv(postedMb)
} else {
while {[string equal [$menu cget -type] "normal"] \