Check-in [b7d5683527]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:add tk upstream changes
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b7d5683527a619f00e38c23e92e5567248223e7b
User & Date: chw 2019-02-10 20:38:59
Context
2019-02-10
21:09
add experimental jsmpeg SDL video driver check-in: 713b08b2bf user: chw tags: trunk
20:39
merge with trunk check-in: 2c052c6d18 user: chw tags: wtf-8-experiment
20:38
add tk upstream changes check-in: b7d5683527 user: chw tags: trunk
2019-02-09
07:12
add tk upstream changes check-in: a88592eb04 user: chw tags: trunk
Changes

Changes to jni/sdl2tk/macosx/tkMacOSXMenu.c.

  1034   1034   
  1035   1035   /*
  1036   1036    *----------------------------------------------------------------------
  1037   1037    *
  1038   1038    * CheckForSpecialMenu --
  1039   1039    *
  1040   1040    *	Given a menu, check to see whether or not it is a cascade in a menubar
  1041         - *	with one of the special names .apple, .help or .window If it is, the
  1042         - *	entry that points to this menu will be marked.
         1041  + *	with one of the special names ".apple", ".help" or ".window".  If it
         1042  + *	is, the entry that points to this menu will be marked.
  1043   1043    *
  1044   1044    * Results:
  1045   1045    *	None.
  1046   1046    *
  1047   1047    * Side effects:
  1048   1048    *	Will set entryFlags appropriately.
  1049   1049    *
................................................................................
  1212   1212    *--------------------------------------------------------------
  1213   1213    */
  1214   1214   
  1215   1215   void
  1216   1216   TkpComputeStandardMenuGeometry(
  1217   1217       TkMenu *menuPtr)		/* Structure describing menu. */
  1218   1218   {
  1219         -    NSSize menuSize = [(NSMenu *)menuPtr->platformData size];
         1219  +    NSSize menuSize;
  1220   1220       Tk_Font tkfont, menuFont;
  1221   1221       Tk_FontMetrics menuMetrics, entryMetrics, *fmPtr;
  1222   1222       int modifierCharWidth, menuModifierCharWidth;
  1223   1223       int x, y, modifierWidth, labelWidth, indicatorSpace;
  1224   1224       int windowWidth, windowHeight, accelWidth;
  1225   1225       int i, maxWidth;
  1226   1226       int entryWidth, maxIndicatorSpace, borderWidth, activeBorderWidth;
  1227   1227       TkMenuEntry *mePtr;
  1228   1228       int haveAccel = 0;
  1229   1229   
  1230         -    if (menuPtr->tkwin == NULL) {
         1230  +    /*
         1231  +     * Do nothing if this menu is a clone.
         1232  +     */
         1233  +    if (menuPtr->tkwin == NULL || menuPtr->masterMenuPtr != menuPtr) {
  1231   1234   	return;
  1232   1235       }
  1233         -
         1236  +    
         1237  +    menuSize = [(NSMenu *)menuPtr->platformData size];
  1234   1238       Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->borderWidthPtr,
  1235   1239   	    &borderWidth);
  1236   1240       Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->activeBorderWidthPtr,
  1237   1241   	    &activeBorderWidth);
  1238   1242       x = y = borderWidth;
  1239   1243       windowHeight = maxWidth = 0;
  1240   1244       maxIndicatorSpace = 0;