Adapt code from AquaEmacs to handle occasional blank menus.
authorJan Djärv <jan.h.d@swipnet.se>
Sun, 18 Dec 2011 14:50:19 +0000 (15:50 +0100)
committerJan Djärv <jan.h.d@swipnet.se>
Sun, 18 Dec 2011 14:50:19 +0000 (15:50 +0100)
commit5fecd5fce0bac31f1d39d84caa9d2c444c8e7e01
tree884906787db3c2cb7af26ca28e9e25f3f0e5a58a
parentc803b2b767f8ed06beb28106a03f23bc577cfdae
Adapt code from AquaEmacs to handle occasional blank menus.

* nsmenu.m (trackingMenu): New variable.
(NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5 and
NS_IMPL_COCOA.
(trackingNotification): New method (from AquaEmacs).
(menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
from AquaEmacs.
(syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.

* nsterm.m (ns_term_init): Subscribe for notifications
NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
to method trackingNotification in EmacsMenu.

Fixes: debbugs:7030
src/ChangeLog
src/nsmenu.m
src/nsterm.m