]> code.delx.au - gnu-emacs/commitdiff
Attempt to fix NS hang. Will probably cause merge conflicts.
authorJan Djärv <jan.h.d@swipnet.se>
Sat, 8 Nov 2014 16:32:37 +0000 (17:32 +0100)
committerJan Djärv <jan.h.d@swipnet.se>
Sat, 8 Nov 2014 16:32:37 +0000 (17:32 +0100)
* 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
src/ChangeLog
src/nsterm.h
src/nsterm.m

index 81e2a27c200f85a7b7849d8197e333cd1a40c3d1..1544df0da8c1c00a581b9d81eadf677d2c7740fc 100644 (file)
@@ -1,3 +1,9 @@
+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
index eb2165a89d38920f13f7f0b1ad95ce24503640da..cc5ec0d014bbbd1daf4a6eb3ba3d8a0f159213ae 100644 (file)
@@ -100,7 +100,7 @@ typedef float EmacsCGFloat;
 /* 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
index 45c6214f0d09db78ea99408ee3f796afdcc9553c..190698db1fe4eba5b9ff62772e8a77ae15a343ad 100644 (file)
@@ -4452,7 +4452,7 @@ ns_term_shutdown (int sig)
 {
   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
@@ -4463,9 +4463,19 @@ ns_term_shutdown (int sig)
   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];
@@ -4496,7 +4506,7 @@ ns_term_shutdown (int sig)
     // The file dialog still leaks 7k - 10k on 10.9 though.
     [super stop:sender];
 }
-#endif
+#endif /* NS_IMPL_COCOA */
 
 - (void)logNotification: (NSNotification *)notification
 {