changeset 103594:18711f21d4a9

nsterm.m (keydown): avoid infinite loop
author David Reitter <david.reitter@gmail.com>
date Fri, 26 Jun 2009 18:37:41 +0000
parents 3acb65a2fdd5
children de3fb78ac3df
files src/ChangeLog src/nsterm.m
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Jun 26 14:42:43 2009 +0000
+++ b/src/ChangeLog	Fri Jun 26 18:37:41 2009 +0000
@@ -1,3 +1,7 @@
+2009-06-26  David Reitter <david.reitter@gmail.com>
+
+	* nsterm.m (keydown): avoid infinite loop
+
 2009-06-26  Peter Jolly  <peter@jollys.org>  (tiny change)
 
 	* ftfont.c (get_adstyle_property): Call font_intern_prop with 1 as
--- a/src/nsterm.m	Fri Jun 26 14:42:43 2009 +0000
+++ b/src/nsterm.m	Fri Jun 26 18:37:41 2009 +0000
@@ -4468,7 +4468,9 @@
     return;
 
  if (![[self window] isKeyWindow]
-     && [[theEvent window] isKindOfClass: [EmacsWindow class]])
+     && [[theEvent window] isKindOfClass: [EmacsWindow class]]
+     /* we must avoid an infinite loop here. */
+     && (EmacsView *)[[theEvent window] delegate] != self)
    {
      /* XXX: There is an occasional condition in which, when Emacs display
          updates a different frame from the current one, and temporarily