summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2003-05-27 23:44:35 (GMT)
committervincentdarley <vincentdarley>2003-05-27 23:44:35 (GMT)
commitada3bf7c34d4b5935db74f2304ca9aa3a79b7272 (patch)
treeecfbd0ee59e5675a5ac8ec680a0af0e22487b662
parent081bfc14c29ee47ed69bbc77f8ff75ea98e9a622 (diff)
downloadtk-ada3bf7c34d4b5935db74f2304ca9aa3a79b7272.zip
tk-ada3bf7c34d4b5935db74f2304ca9aa3a79b7272.tar.gz
tk-ada3bf7c34d4b5935db74f2304ca9aa3a79b7272.tar.bz2
MacOS tearoff menu location fix
-rw-r--r--ChangeLog3
-rw-r--r--library/tearoff.tcl7
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f04f21e..3225443 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,9 @@
* generic/tkText.h: refactoring of text widget cleanup code
to ensure all resources are freed. [Bug#741179]
+ * library/tearoff.tcl: ensure torn-off menus do not appear underneath
+ the MacOS/MacOS X main menu bar.
+
2003-05-23 Mo DeJong <mdejong@users.sourceforge.net>
* unix/mkLinks: Set the var S to "" at the top
diff --git a/library/tearoff.tcl b/library/tearoff.tcl
index 8bcdc81..3ee6ca3 100644
--- a/library/tearoff.tcl
+++ b/library/tearoff.tcl
@@ -2,7 +2,7 @@
#
# This file contains procedures that implement tear-off menus.
#
-# RCS: @(#) $Id: tearoff.tcl,v 1.7 2001/08/01 16:21:11 dgp Exp $
+# RCS: @(#) $Id: tearoff.tcl,v 1.8 2003/05/27 23:44:36 vincentdarley Exp $
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -37,6 +37,11 @@ proc ::tk::TearOffMenu {w {x 0} {y 0}} {
}
if {$y == 0} {
set y [winfo rooty $w]
+ if {[tk windowingsystem] eq "macintosh" \
+ || [tk windowingsystem] eq "aqua"} {
+ # Avoid the native menu bar which sits on top of everything.
+ if {$y < 20} { set y 20 }
+ }
}
set parent [winfo parent $w]