[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 a6ae479: Post AppDefined events from the main thr
From: |
Alan Third |
Subject: |
[Emacs-diffs] emacs-25 a6ae479: Post AppDefined events from the main thread ONLY (bug#23934) |
Date: |
Wed, 3 Aug 2016 16:56:53 +0000 (UTC) |
branch: emacs-25
commit a6ae47921603da8c28354c120e84507b44a761e5
Author: Alan Third <address@hidden>
Commit: Alan Third <address@hidden>
Post AppDefined events from the main thread ONLY (bug#23934)
* src/nsterm.h: Make nextappdefined var not just GNUStep.
* src/nsterm.c (ns_send_appdefined, sendFromMainThread): Remove GNUStep
---
src/nsterm.h | 2 +-
src/nsterm.m | 5 +----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/nsterm.h b/src/nsterm.h
index 0aea9cc..4b246bd 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -380,9 +380,9 @@ char const * nstrace_fullscreen_type_name (int);
#endif
#ifdef NS_IMPL_GNUSTEP
BOOL applicationDidFinishLaunchingCalled;
+#endif
@public
int nextappdefined;
-#endif
}
- (void)logNotification: (NSNotification *)notification;
- (void)antialiasThresholdDidChange:(NSNotification *)notification;
diff --git a/src/nsterm.m b/src/nsterm.m
index e6a10b8..4d9d105 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -3918,8 +3918,8 @@ ns_send_appdefined (int value)
{
NSTRACE_WHEN (NSTRACE_GROUP_EVENTS, "ns_send_appdefined(%d)", value);
-#ifdef NS_IMPL_GNUSTEP
// GNUstep needs postEvent to happen on the main thread.
+ // Cocoa needs nextEventMatchingMask to happen on the main thread too.
if (! [[NSThread currentThread] isMainThread])
{
EmacsApp *app = (EmacsApp *)NSApp;
@@ -3929,7 +3929,6 @@ ns_send_appdefined (int value)
waitUntilDone:YES];
return;
}
-#endif
/* Only post this event if we haven't already posted one. This will end
the [NXApp run] main loop after having processed all events queued at
@@ -5542,12 +5541,10 @@ not_in_argv (NSString *arg)
ns_send_appdefined (-2);
}
-#ifdef NS_IMPL_GNUSTEP
- (void)sendFromMainThread:(id)unused
{
ns_send_appdefined (nextappdefined);
}
-#endif
- (void)fd_handler:(id)unused
/* --------------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 a6ae479: Post AppDefined events from the main thread ONLY (bug#23934),
Alan Third <=