changeset 10745:293cb6865e64

8073008: press-and-hold input method for accented characters works incorrectly on OS X Reviewed-by: azvegint, alexp
author anashaty
date Mon, 16 Mar 2015 20:55:08 +0300
parents f31bbaa095ff
children 1472ef5e1416
files src/macosx/native/sun/awt/AWTView.m
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/native/sun/awt/AWTView.m	Thu Mar 12 13:46:10 2015 -0700
+++ b/src/macosx/native/sun/awt/AWTView.m	Mon Mar 16 20:55:08 2015 +0300
@@ -310,7 +310,10 @@
 }
 
 - (BOOL) performKeyEquivalent: (NSEvent *) event {
-    [self deliverJavaKeyEventHelper: event];
+    // if IM is active key events should be ignored 
+    if (![self hasMarkedText] && !fInPressAndHold) {
+        [self deliverJavaKeyEventHelper: event];
+    }
 
     // Workaround for 8020209: special case for "Cmd =" and "Cmd ." 
     // because Cocoa calls performKeyEquivalent twice for these keystrokes