diff options
| author | Jan Djärv | 2014-11-08 17:32:37 +0100 |
|---|---|---|
| committer | Jan Djärv | 2014-11-08 17:32:37 +0100 |
| commit | 86b1c771e14efcc98f8fe07510a4238bf94ced7b (patch) | |
| tree | cb7e51bb948167a22af7638f6a8454cbd6e13d5c | |
| parent | 89be8b92a6678ca14cf8f48bdb905542f3b58b9e (diff) | |
| download | emacs-86b1c771e14efcc98f8fe07510a4238bf94ced7b.tar.gz emacs-86b1c771e14efcc98f8fe07510a4238bf94ced7b.zip | |
Attempt to fix NS hang. Will probably cause merge conflicts.
* 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
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/nsterm.h | 2 | ||||
| -rw-r--r-- | src/nsterm.m | 16 |
3 files changed, 20 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 81e2a27c200..1544df0da8c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2014-11-08 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * nsterm.m (init): Replace OSX 10.9 check with IMPL_COCOA. | ||
| 4 | (run): Ditto. Only use non-system event loop if OSX version is | ||
| 5 | exactly 10.9 (Bug#18993). | ||
| 6 | |||
| 1 | 2014-11-07 Michael Albinus <michael.albinus@gmx.de> | 7 | 2014-11-07 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 8 | ||
| 3 | * callproc.c (encode_current_directory): Support handling of file | 9 | * callproc.c (encode_current_directory): Support handling of file |
diff --git a/src/nsterm.h b/src/nsterm.h index eb2165a89d3..cc5ec0d014b 100644 --- a/src/nsterm.h +++ b/src/nsterm.h | |||
| @@ -100,7 +100,7 @@ typedef float EmacsCGFloat; | |||
| 100 | /* We override sendEvent: as a means to stop/start the event loop */ | 100 | /* We override sendEvent: as a means to stop/start the event loop */ |
| 101 | @interface EmacsApp : NSApplication | 101 | @interface EmacsApp : NSApplication |
| 102 | { | 102 | { |
| 103 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 | 103 | #ifdef NS_IMPL_COCOA |
| 104 | BOOL shouldKeepRunning; | 104 | BOOL shouldKeepRunning; |
| 105 | BOOL isFirst; | 105 | BOOL isFirst; |
| 106 | #endif | 106 | #endif |
diff --git a/src/nsterm.m b/src/nsterm.m index 45c6214f0d0..190698db1fe 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -4452,7 +4452,7 @@ ns_term_shutdown (int sig) | |||
| 4452 | { | 4452 | { |
| 4453 | if (self = [super init]) | 4453 | if (self = [super init]) |
| 4454 | { | 4454 | { |
| 4455 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 | 4455 | #ifdef NS_IMPL_COCOA |
| 4456 | self->isFirst = YES; | 4456 | self->isFirst = YES; |
| 4457 | #endif | 4457 | #endif |
| 4458 | #ifdef NS_IMPL_GNUSTEP | 4458 | #ifdef NS_IMPL_GNUSTEP |
| @@ -4463,9 +4463,19 @@ ns_term_shutdown (int sig) | |||
| 4463 | return self; | 4463 | return self; |
| 4464 | } | 4464 | } |
| 4465 | 4465 | ||
| 4466 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 | 4466 | #ifdef NS_IMPL_COCOA |
| 4467 | - (void)run | 4467 | - (void)run |
| 4468 | { | 4468 | { |
| 4469 | #ifndef NSAppKitVersionNumber10_9 | ||
| 4470 | #define NSAppKitVersionNumber10_9 1265 | ||
| 4471 | #endif | ||
| 4472 | |||
| 4473 | if ((int)NSAppKitVersionNumber != NSAppKitVersionNumber10_9) | ||
| 4474 | { | ||
| 4475 | [super run]; | ||
| 4476 | return; | ||
| 4477 | } | ||
| 4478 | |||
| 4469 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | 4479 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; |
| 4470 | 4480 | ||
| 4471 | if (isFirst) [self finishLaunching]; | 4481 | if (isFirst) [self finishLaunching]; |
| @@ -4496,7 +4506,7 @@ ns_term_shutdown (int sig) | |||
| 4496 | // The file dialog still leaks 7k - 10k on 10.9 though. | 4506 | // The file dialog still leaks 7k - 10k on 10.9 though. |
| 4497 | [super stop:sender]; | 4507 | [super stop:sender]; |
| 4498 | } | 4508 | } |
| 4499 | #endif | 4509 | #endif /* NS_IMPL_COCOA */ |
| 4500 | 4510 | ||
| 4501 | - (void)logNotification: (NSNotification *)notification | 4511 | - (void)logNotification: (NSNotification *)notification |
| 4502 | { | 4512 | { |