diff src/nsterm.m @ 101351:1789feb8fd54

* nsterm.m (EmavsView-keyDown:): Treat nil as Qnone for ns_alternate_modifier. (Bug#1217)
author Adrian Robert <Adrian.B.Robert@gmail.com>
date Thu, 22 Jan 2009 11:39:10 +0000
parents 954e1944ccf2
children 64413c753b62
line wrap: on
line diff
--- a/src/nsterm.m	Thu Jan 22 07:00:08 2009 +0000
+++ b/src/nsterm.m	Thu Jan 22 11:39:10 2009 +0000
@@ -4213,11 +4213,17 @@
 
 
 /* TODO: these may help w/IO switching btwn terminal and NSApp */
+- (void)applicationWillBecomeActive: (NSNotification *)notification
+{
+  //ns_app_active=YES;
+}
 - (void)applicationDidBecomeActive: (NSNotification *)notification
 {
+  //ns_app_active=YES;
 }
 - (void)applicationDidResignActive: (NSNotification *)notification
 {
+  //ns_app_active=NO;
   ns_send_appdefined (-1);
 }
 
@@ -4505,7 +4511,8 @@
 
       if (flags & NSAlternateKeyMask) /* default = meta */
         {
-          if (EQ (ns_alternate_modifier, Qnone) && !fnKeysym)
+          if ((NILP (ns_alternate_modifier) || EQ (ns_alternate_modifier, Qnone))
+              && !fnKeysym)
             {   /* accept pre-interp alt comb */
               if ([[theEvent characters] length] > 0)
                 code = [[theEvent characters] characterAtIndex: 0];