mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 20:44:41 +02:00
7142565: [macosx] Many special keys processed twice in text fields
Forward port from 7u4 Reviewed-by: anthony
This commit is contained in:
parent
c0f2f2b464
commit
e49b6e7624
1 changed files with 7 additions and 1 deletions
|
@ -48,7 +48,6 @@
|
||||||
//#define IM_DEBUG TRUE
|
//#define IM_DEBUG TRUE
|
||||||
//#define EXTRA_DEBUG
|
//#define EXTRA_DEBUG
|
||||||
|
|
||||||
|
|
||||||
static BOOL shouldUsePressAndHold() {
|
static BOOL shouldUsePressAndHold() {
|
||||||
static int shouldUsePressAndHold = -1;
|
static int shouldUsePressAndHold = -1;
|
||||||
if (shouldUsePressAndHold != -1) return shouldUsePressAndHold;
|
if (shouldUsePressAndHold != -1) return shouldUsePressAndHold;
|
||||||
|
@ -394,6 +393,13 @@ AWT_ASSERT_APPKIT_THREAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void) deliverJavaKeyEventHelper: (NSEvent *) event {
|
-(void) deliverJavaKeyEventHelper: (NSEvent *) event {
|
||||||
|
static id sUnretainedLastKeyEvent = nil;
|
||||||
|
if (event == sUnretainedLastKeyEvent) {
|
||||||
|
// The event is repeatedly delivered by keyDown: after performKeyEquivalent:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
sUnretainedLastKeyEvent = event;
|
||||||
|
|
||||||
[AWTToolkit eventCountPlusPlus];
|
[AWTToolkit eventCountPlusPlus];
|
||||||
JNIEnv *env = [ThreadUtilities getJNIEnv];
|
JNIEnv *env = [ThreadUtilities getJNIEnv];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue