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
This commit is contained in:
parent
d35d398bdb
commit
a6ae479216
2 changed files with 2 additions and 5 deletions
|
@ -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;
|
||||
|
|
|
@ -3918,8 +3918,8 @@ overwriting cursor (usually when cursor on a tab) */
|
|||
{
|
||||
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 @@ overwriting cursor (usually when cursor on a tab) */
|
|||
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 @@ - (void)timeout_handler: (NSTimer *)timedEntry
|
|||
ns_send_appdefined (-2);
|
||||
}
|
||||
|
||||
#ifdef NS_IMPL_GNUSTEP
|
||||
- (void)sendFromMainThread:(id)unused
|
||||
{
|
||||
ns_send_appdefined (nextappdefined);
|
||||
}
|
||||
#endif
|
||||
|
||||
- (void)fd_handler:(id)unused
|
||||
/* --------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Reference in a new issue