From a3b53a857d0b2333206ae0d28a77bb1c702f7c42 Mon Sep 17 00:00:00 2001 From: Adrian Robert Date: Thu, 22 Jan 2009 11:39:10 +0000 Subject: [PATCH] * nsterm.m (EmavsView-keyDown:): Treat nil as Qnone for ns_alternate_modifier. (Bug#1217) --- src/ChangeLog | 5 +++++ src/nsterm.m | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index a3832220133..b2cba276687 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-01-21 Adrian Robert + + * nsterm.m (EmavsView-keyDown:): Treat nil as Qnone for + ns_alternate_modifier. (Bug#1217) + 2009-01-22 Chong Yidong * fileio.c (Vwrite_region_post_annotation_function) diff --git a/src/nsterm.m b/src/nsterm.m index 826efc4a22a..119839e05d1 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -4213,11 +4213,17 @@ fprintf (stderr, "res = %d\n", EQ (res, Qt)); /* FIXME */ /* 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 @@ extern void update_window_cursor (struct window *w, int on); 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]; -- 2.39.2