diff options
-rw-r--r-- | macosx/tkMacOSXDraw.c | 1 | ||||
-rw-r--r-- | macosx/tkMacOSXMenu.c | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index 5bafad1..806cbf4 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -17,6 +17,7 @@ #include "tkMacOSXDebug.h" #include "xbytes.h" + /* #ifdef TK_MAC_DEBUG #define TK_MAC_DEBUG_DRAWING diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index 3ada6d7..19db490 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -251,6 +251,8 @@ static int ModifierCharWidth(Tk_Font tkfont); if (menuPtr && mePtr) { Tcl_Interp *interp = menuPtr->interp; + /*Add time for errors to fire if necessary. This is sub-optimal but avoids issues with Tcl/Cocoa event loop integration.*/ + Tcl_Sleep(100); Tcl_Preserve(interp); Tcl_Preserve(menuPtr); @@ -343,8 +345,8 @@ static int ModifierCharWidth(Tk_Font tkfont); int result = TkPostCommand(_tkMenu); if (result!=TCL_OK && result!=TCL_CONTINUE && result!=TCL_BREAK) { - Tcl_AddErrorInfo(interp, "\n (menu preprocess)"); - Tcl_BackgroundException(interp, result); + Tcl_AddErrorInfo(interp, "\n (menu preprocess)"); + Tcl_BackgroundException(interp, result); } Tcl_Release(menuPtr); Tcl_Release(interp); |