From a5bd5abb645ea5c0e5bb45425128166af44dc237 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Tue, 13 Aug 2013 22:18:30 +0200 Subject: [PATCH] Fix OSX 10.4 compiler errors. * nsmenu.m (x_activate_menubar): Check for OSX >= 10.5 (trackingNotification:): Call ns_check_menu_open only for OSX >= 10.5. --- src/ChangeLog | 5 +++++ src/nsmenu.m | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index af76a0c3780..0c0583684dc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-08-13 Jan Djärv + + * nsmenu.m (x_activate_menubar): Check for OSX >= 10.5 + (trackingNotification:): Call ns_check_menu_open only for OSX >= 10.5. + 2013-08-13 Lars Magne Ingebrigtsen * image.c (imagemagick_filename_hint): Check for errors in the diff --git a/src/nsmenu.m b/src/nsmenu.m index 2850f0ed97d..3266d76450c 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -504,9 +504,11 @@ void x_activate_menubar (struct frame *f) { #ifdef NS_IMPL_COCOA +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 ns_update_menubar (f, true, nil); ns_check_pending_open_menu (); #endif +#endif } @@ -563,7 +565,9 @@ extern NSString *NSMenuDidBeginTrackingNotification; /* Update menu in menuNeedsUpdate only while tracking menus. */ trackingMenu = ([notification name] == NSMenuDidBeginTrackingNotification ? 1 : 0); +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 if (! trackingMenu) ns_check_menu_open (nil); +#endif } #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 -- 2.39.2