summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorculler <culler>2017-11-30 15:06:33 (GMT)
committerculler <culler>2017-11-30 15:06:33 (GMT)
commitece2d7c38de06e372c38ecd93d09a97b36a449da (patch)
treeba2238c60661b9cedbab08495a083f037868607b /macosx
parent1e639f454d400f59c76463b1e9087974a6e827e0 (diff)
downloadtk-ece2d7c38de06e372c38ecd93d09a97b36a449da.zip
tk-ece2d7c38de06e372c38ecd93d09a97b36a449da.tar.gz
tk-ece2d7c38de06e372c38ecd93d09a97b36a449da.tar.bz2
Add missing code to run the postcommand in TkpPostMenu for macOS. Fixes [13d63d2794].
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXMenu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index 2101977..1e0dc40 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -770,8 +770,15 @@ TkpPostMenu(
Drawable d = Tk_WindowId(root);
NSView *rootview = TkMacOSXGetRootControl(d);
NSWindow *win = [rootview window];
+ int result;
inPostMenu = 1;
+
+ result = TkPreprocessMenu(menuPtr);
+ if (result != TCL_OK) {
+ inPostMenu = 0;
+ return result;
+ }
int oldMode = Tcl_SetServiceMode(TCL_SERVICE_NONE);
NSView *view = [win contentView];