summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2011-08-05 00:11:19 (GMT)
committerKevin Walzer <kw@codebykevin.com>2011-08-05 00:11:19 (GMT)
commit72ce81a049b258f65e778a1b37e57af94c643159 (patch)
treee4b763859d29a126a9f2d8f0c8397fa72863ccfa
parent0726563f613388aad5a365791aa72dfea1781644 (diff)
downloadtk-72ce81a049b258f65e778a1b37e57af94c643159.zip
tk-72ce81a049b258f65e778a1b37e57af94c643159.tar.gz
tk-72ce81a049b258f65e778a1b37e57af94c643159.tar.bz2
Fix for bgerror conflict with Tk-Cocoa menu
-rw-r--r--macosx/tkMacOSXDraw.c1
-rw-r--r--macosx/tkMacOSXMenu.c6
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);