diff src/nsterm.m @ 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 49d3f24a1a60
children a855751fb89e
line wrap: on
line diff
--- 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