From: Alan Third Date: Thu, 7 Jul 2016 19:42:11 +0000 (+0100) Subject: Fix some deprecated functions X-Git-Tag: emacs-26.0.90~1840^2~100 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5508f06f3283b4129cd70340a58ba608cc810d4e;p=emacs.git Fix some deprecated functions * src/nsterm.m (firstRectForCharacterRange): In OS X >10.6 replace convertBaseToScreen with convertRectToScreen. * src/nsmenu.m (ns_update_menubar): Remove attachedMenu, deprecated in OS X 10.2, and always seems to return nil. --- diff --git a/src/nsmenu.m b/src/nsmenu.m index 7d340e8ec83..10dfe8aac13 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -136,12 +136,6 @@ ns_update_menubar (struct frame *f, bool deep_p, EmacsMenu *submenu) menu = [[EmacsMenu alloc] initWithTitle: ns_app_name]; needsSet = YES; } - else - { /* close up anything on there */ - id attMenu = [menu attachedMenu]; - if (attMenu != nil) - [attMenu close]; - } #if NSMENUPROFILE ftime (&tb); diff --git a/src/nsterm.m b/src/nsterm.m index 4027f5c4615..bd477a491ff 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -6191,8 +6191,14 @@ not_in_argv (NSString *arg) +FRAME_LINE_HEIGHT (emacsframe)); pt = [self convertPoint: pt toView: nil]; +#if !defined (NS_IMPL_COCOA) || \ + MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 pt = [[self window] convertBaseToScreen: pt]; rect.origin = pt; +#else + rect.origin = pt; + rect = [[self window] convertRectToScreen: rect]; +#endif return rect; }