* nsterm.m (init): Replace OSX 10.9 check with IMPL_COCOA.
(run): Ditto. Only use non-system event loop if OSX version is
exactly 10.9.
Fixes: debbugs:18993
+2014-11-08 Jan Djärv <jan.h.d@swipnet.se>
+
+ * nsterm.m (init): Replace OSX 10.9 check with IMPL_COCOA.
+ (run): Ditto. Only use non-system event loop if OSX version is
+ exactly 10.9 (Bug#18993).
+
2014-11-07 Michael Albinus <michael.albinus@gmx.de>
* callproc.c (encode_current_directory): Support handling of file
/* We override sendEvent: as a means to stop/start the event loop */
@interface EmacsApp : NSApplication
{
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
+#ifdef NS_IMPL_COCOA
BOOL shouldKeepRunning;
BOOL isFirst;
#endif
{
if (self = [super init])
{
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
+#ifdef NS_IMPL_COCOA
self->isFirst = YES;
#endif
#ifdef NS_IMPL_GNUSTEP
return self;
}
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
+#ifdef NS_IMPL_COCOA
- (void)run
{
+#ifndef NSAppKitVersionNumber10_9
+#define NSAppKitVersionNumber10_9 1265
+#endif
+
+ if ((int)NSAppKitVersionNumber != NSAppKitVersionNumber10_9)
+ {
+ [super run];
+ return;
+ }
+
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
if (isFirst) [self finishLaunching];
// The file dialog still leaks 7k - 10k on 10.9 though.
[super stop:sender];
}
-#endif
+#endif /* NS_IMPL_COCOA */
- (void)logNotification: (NSNotification *)notification
{