changeset 12660:76c54631149e

7154072: [macosx] swallowing key events Summary: forward posrt from 7u4 Reviewed-by: anthony
author ant
date Thu, 17 May 2012 21:31:55 +0400
parents fa378682b3cb
children 6cf8b7116579
files jdk/src/macosx/native/sun/awt/AWTView.m
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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];