t = -(1000*tb.time+tb.millitm);
#endif
+#ifdef NS_IMPL_GNUSTEP
+ deep_p = 1; /* See comment in menuNeedsUpdate. */
+#endif
+
if (deep_p)
{
/* Make a widget-value tree representing the entire menu trees. */
}
-/* Delegate method called when a submenu is being opened: run a 'deep' call
- to set_frame_menubar. */
-
-/* TODO: GNUstep calls this method when the menu is still being built
- which throws it into an infinite loop. One possible solution is to
- use menuWillOpen instead, but the Apple docs explicitly warn
- against changing the contents of the menu in it. I don't know what
- the right thing to do for GNUstep is. */
+/* Delegate method called when a submenu is being opened: run a 'deep'
+ call to ns_update_menubar. */
- (void)menuNeedsUpdate: (NSMenu *)menu
{
if (!FRAME_LIVE_P (SELECTED_FRAME ()))
return;
+#ifdef NS_IMPL_COCOA
+/* TODO: GNUstep calls this method when the menu is still being built
+ which results in a recursive stack overflow. One possible solution
+ is to use menuWillOpen instead, but the Apple docs explicitly warn
+ against changing the contents of the menu in it. I don't know what
+ the right thing to do for GNUstep is. */
if (needsUpdate)
ns_update_menubar (SELECTED_FRAME (), true);
+#endif
}