--- a/jdk/src/macosx/native/sun/awt/AWTView.m Thu May 17 21:27:19 2012 +0400
+++ b/jdk/src/macosx/native/sun/awt/AWTView.m Thu May 17 21:31:55 2012 +0400
@@ -393,12 +393,13 @@
}
-(void) deliverJavaKeyEventHelper: (NSEvent *) event {
- static id sUnretainedLastKeyEvent = nil;
- if (event == sUnretainedLastKeyEvent) {
+ static NSEvent* sLastKeyEvent = nil;
+ if (event == sLastKeyEvent) {
// The event is repeatedly delivered by keyDown: after performKeyEquivalent:
return;
}
- sUnretainedLastKeyEvent = event;
+ [sLastKeyEvent release];
+ sLastKeyEvent = [event retain];
[AWTToolkit eventCountPlusPlus];
JNIEnv *env = [ThreadUtilities getJNIEnv];