summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXMenu.c
diff options
context:
space:
mode:
authorculler <culler>2019-01-28 17:06:53 (GMT)
committerculler <culler>2019-01-28 17:06:53 (GMT)
commit41dd35f2c689c31dc23cde598c7828276b3186b7 (patch)
treefce6648ef1432d673f0c97d36ded0f723b47b9c1 /macosx/tkMacOSXMenu.c
parente087bb7d89526c82c0c0fb1e1bf5a6f21cf6d2ab (diff)
downloadtk-41dd35f2c689c31dc23cde598c7828276b3186b7.zip
tk-41dd35f2c689c31dc23cde598c7828276b3186b7.tar.gz
tk-41dd35f2c689c31dc23cde598c7828276b3186b7.tar.bz2
Edited comments.
Diffstat (limited to 'macosx/tkMacOSXMenu.c')
-rw-r--r--macosx/tkMacOSXMenu.c35
1 files changed, 31 insertions, 4 deletions
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index d261add..bba2cfd 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -753,16 +753,15 @@ TkpDestroyMenuEntry(
/*
*----------------------------------------------------------------------
*
- * TkpPostMenu, TkPostTearoffMenu --
+ * TkpPostMenu --
*
- * Posts a menu on the screen. (Tearoff menus are the same as
- * ordinary menus on the mac.) If entry is < 0 then the menu is
+ * Posts a menu on the screen. If entry is < 0 then the menu is
* drawn so its top left corner is located at the point with
* screen coordinates (x, y). Otherwise the top left corner of
* the specified entry is located at that point.
*
* Results:
- * None.
+ * Returns a standard Tcl result.
*
* Side effects:
* The menu is posted and handled.
@@ -823,6 +822,34 @@ TkpPostMenu(
inPostMenu = 0;
return TCL_OK;
}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TkpPostTearoffMenu --
+ *
+ * Tearoff menus are not supported on the Mac. This placeholder
+ * function, which is simply a copy of the unix function, posts a
+ * completely useless window with a black background on the screen. If
+ * entry is < 0 then the window is positioned so that its top left corner
+ * is located at the point with screen coordinates (x, y). Otherwise the
+ * window position is offset so that top left corner of the specified
+ * entry would be located at that point, if there actually were a menu.
+ *
+ * Mac menus steal all mouse or keyboard input from the application until
+ * the menu is dismissed, with or without a selection, by a mouse or key
+ * event. Posting a Mac menu in a regression test will cause the test to
+ * halt waiting for user input. This is why the TkpPostMenu function is
+ * not being used as the placeholder.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * A useless window is posted.
+ *
+ *----------------------------------------------------------------------
+ */
int
TkpPostTearoffMenu(