nsterm.m (keydown): avoid infinite loop
authorDavid Reitter <david.reitter@gmail.com>
Fri, 26 Jun 2009 18:37:41 +0000 (18:37 +0000)
committerDavid Reitter <david.reitter@gmail.com>
Fri, 26 Jun 2009 18:37:41 +0000 (18:37 +0000)
src/ChangeLog
src/nsterm.m

index c1511e9..bf0dcfd 100644 (file)
@@ -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
index 0089dc3..75567de 100644 (file)
@@ -4468,7 +4468,9 @@ extern void update_window_cursor (struct window *w, int on);
     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