summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXMenu.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-09-09 23:52:02 (GMT)
committerhobbs <hobbs>2002-09-09 23:52:02 (GMT)
commit958042034bbbe215fbb0915cf6c07b9914923724 (patch)
tree804bf93151524b4ec43b4495c97883b3f0b0d9d8 /macosx/tkMacOSXMenu.c
parentec6a4daee7df6a5652185b52f34a9e48d28a652e (diff)
downloadtk-958042034bbbe215fbb0915cf6c07b9914923724.zip
tk-958042034bbbe215fbb0915cf6c07b9914923724.tar.gz
tk-958042034bbbe215fbb0915cf6c07b9914923724.tar.bz2
* library/tk.tcl: use command instead of control on Aqua bindings.
Force dialogs to appear below fixed native Mac menubar. * macosx/tkMacOSXKeyEvent.c: * macosx/tkMacOSXKeyboard.c: Keypress/release events for pure modifier keys were not being passed to Tk. Deadkey presses were inserting null characters into text windows. Now they do nothing. (Still not ideal, but better than before!) * macosx/tkMacOSXMenu.c: Allow more than 200 menus to exist - increased to 2000. * macosx/tkMacOSXMouseEvent.c: Bad interactions between floating windows and ordinary ones. Ensure that local<->global coordinate transformations are wrt to the correct window. * macosx/tkMacOSXWm.c: Better error msg for 'wm attributes'. Remove crash in 'wm transient'. Add 'noActivates' and 'noUpdates' flags to unsupported command. [Patch #606658] (darley)
Diffstat (limited to 'macosx/tkMacOSXMenu.c')
-rw-r--r--macosx/tkMacOSXMenu.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index 8578359..401bce5 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.2 2002/08/31 06:12:30 das Exp $
+ * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.3 2002/09/09 23:52:02 hobbs Exp $
*/
#include "tkMacOSXInt.h"
#include "tkMenuButton.h"
@@ -188,7 +188,7 @@ static int inPostMenu; /* We cannot be re-entrant like X
* windows. */
static short lastMenuID; /* To pass to NewMenu; need to figure out
* a good way to do this. */
-static unsigned char lastCascadeID;
+static short lastCascadeID;
/* Cascades have to have ids that are
* less than 256. */
static MacDrawable macMDEFDrawable;
@@ -390,6 +390,11 @@ TkMacOSXUseMenuID(
* the fly. We use the id as a key into a hash table; if there
* is no hash entry, we know that we can use the id.
*
+ * Carbon allows a much larger number of menus than the old APIs.
+ * I believe this is 32768, but am not sure. This code just uses
+ * 2000 as the upper limit. Unfortunately tk leaks menus when
+ * cloning, under some circumstances (see bug on sourceforge).
+ *
* Results:
* Returns TCL_OK if succesful; TCL_ERROR if there are no more
* ids of the appropriate type to allocate. menuIDPtr contains
@@ -448,8 +453,8 @@ int
* dealt with separately.
*/
- unsigned char curID = lastCascadeID + 1;
- if (curID == 236) {
+ short curID = lastCascadeID + 1;
+ if (curID == 2000) {
curID = 0;
}
@@ -463,7 +468,7 @@ int
break;
}
curID++;
- if (curID == 236) {
+ if (curID == 2000) {
curID = 0;
}
}