NSTRACE ("ns_constrain_all_frames");
+ block_input ();
+
FOR_EACH_FRAME (tail, frame)
{
struct frame *f = XFRAME (frame);
display:NO];
}
}
+
+ unblock_input ();
}
recognize and take as a command to halt the event loop.
-------------------------------------------------------------------------- */
{
- /*NSTRACE ("ns_send_appdefined"); */
+ NSTRACE ("ns_send_appdefined");
#ifdef NS_IMPL_GNUSTEP
// GNUstep needs postEvent to happen on the main thread.
if (ns_initialized) return x_display_list;
ns_initialized = 1;
+ block_input ();
+
NSTRACE ("ns_term_init");
[outerpool release];
NSTRACE_MSG ("ns_term_init done");
+ unblock_input ();
+
return dpyinfo;
}
- (id)init
{
+ NSTRACE ("[EmacsApp init]");
+
if ((self = [super init]))
{
#ifdef NS_IMPL_COCOA
#ifdef NS_IMPL_COCOA
- (void)run
{
+ NSTRACE ("[EmacsApp run]");
+
#ifndef NSAppKitVersionNumber10_9
#define NSAppKitVersionNumber10_9 1265
#endif
- (void)stop: (id)sender
{
+ NSTRACE ("[EmacsApp stop]");
+
shouldKeepRunning = NO;
// Stop possible dialog also. Noop if no dialog present.
// The file dialog still leaks 7k - 10k on 10.9 though.
- (void)logNotification: (NSNotification *)notification
{
+ NSTRACE ("[EmacsApp logNotification]");
+
const char *name = [[notification name] UTF8String];
if (!strstr (name, "Update") && !strstr (name, "NSMenu")
&& !strstr (name, "WindowNumber"))
int type = [theEvent type];
NSWindow *window = [theEvent window];
-/* NSTRACE ("sendEvent"); */
+ NSTRACE ("[EmacsApp sendEvent]");
/*fprintf (stderr, "received event of type %d\t%d\n", type);*/
#ifdef NS_IMPL_GNUSTEP
- (void)newFrame: (id)sender
{
+ NSTRACE ("[EmacsApp newFrame]");
+
struct frame *emacsframe = SELECTED_FRAME ();
NSEvent *theEvent = [NSApp currentEvent];
/* Open a file (used by below, after going into queue read by ns_read_socket) */
- (BOOL) openFile: (NSString *)fileName
{
+ NSTRACE ("[EmacsApp openFile]");
+
struct frame *emacsframe = SELECTED_FRAME ();
NSEvent *theEvent = [NSApp currentEvent];
When application is loaded, terminate event loop in ns_term_init
-------------------------------------------------------------------------- */
{
- NSTRACE ("applicationDidFinishLaunching");
+ NSTRACE ("[EmacsApp applicationDidFinishLaunching]");
+
#ifdef NS_IMPL_GNUSTEP
((EmacsApp *)self)->applicationDidFinishLaunchingCalled = YES;
#endif
- (void) terminate: (id)sender
{
+ NSTRACE ("[EmacsApp terminate]");
+
struct frame *emacsframe = SELECTED_FRAME ();
if (!emacs_event)
- (NSApplicationTerminateReply)applicationShouldTerminate: (id)sender
{
+ NSTRACE ("[EmacsApp applicationShouldTerminate]");
+
bool ret;
if (NILP (ns_confirm_quit)) // || ns_shutdown_properly --> TO DO
/* TODO: these may help w/IO switching btwn terminal and NSApp */
- (void)applicationWillBecomeActive: (NSNotification *)notification
{
+ NSTRACE ("[EmacsApp applicationWillBecomeActive]");
//ns_app_active=YES;
}
+
- (void)applicationDidBecomeActive: (NSNotification *)notification
{
- NSTRACE ("applicationDidBecomeActive");
+ NSTRACE ("[EmacsApp applicationDidBecomeActive]");
#ifdef NS_IMPL_GNUSTEP
if (! applicationDidFinishLaunchingCalled)
}
- (void)applicationDidResignActive: (NSNotification *)notification
{
+ NSTRACE ("[EmacsApp applicationDidResignActive]");
+
//ns_app_active=NO;
ns_send_appdefined (-1);
}