8019282: keyRelesed is reached even though key was NOT released
Reviewed-by: serb, anthony
Contributed-by: alexander.zvegintsev@oracle.com
--- a/jdk/make/sun/xawt/mapfile-vers Mon Sep 23 17:55:36 2013 +0400
+++ b/jdk/make/sun/xawt/mapfile-vers Mon Sep 23 21:24:34 2013 +0400
@@ -305,6 +305,7 @@
Java_sun_awt_X11_XlibWrapper_XkbGetUpdatedMap;
Java_sun_awt_X11_XlibWrapper_XkbFreeKeyboard;
Java_sun_awt_X11_XlibWrapper_XkbTranslateKeyCode;
+ Java_sun_awt_X11_XlibWrapper_XkbSetDetectableAutoRepeat;
Java_sun_awt_X11_XlibWrapper_XGetModifierMapping;
Java_sun_awt_X11_XlibWrapper_XFreeModifiermap;
Java_sun_awt_X11_XlibWrapper_XRefreshKeyboardMapping;
--- a/jdk/makefiles/mapfiles/libawt_xawt/mapfile-vers Mon Sep 23 17:55:36 2013 +0400
+++ b/jdk/makefiles/mapfiles/libawt_xawt/mapfile-vers Mon Sep 23 21:24:34 2013 +0400
@@ -305,6 +305,7 @@
Java_sun_awt_X11_XlibWrapper_XkbGetUpdatedMap;
Java_sun_awt_X11_XlibWrapper_XkbFreeKeyboard;
Java_sun_awt_X11_XlibWrapper_XkbTranslateKeyCode;
+ Java_sun_awt_X11_XlibWrapper_XkbSetDetectableAutoRepeat;
Java_sun_awt_X11_XlibWrapper_XGetModifierMapping;
Java_sun_awt_X11_XlibWrapper_XFreeModifiermap;
Java_sun_awt_X11_XlibWrapper_XRefreshKeyboardMapping;
--- a/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java Mon Sep 23 17:55:36 2013 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java Mon Sep 23 21:24:34 2013 +0400
@@ -2249,6 +2249,8 @@
XConstants.XkbModifierMapMask |
XConstants.XkbVirtualModsMask,
XConstants.XkbUseCoreKbd);
+
+ XlibWrapper.XkbSetDetectableAutoRepeat(getDisplay(), true);
}
}
}
--- a/jdk/src/solaris/classes/sun/awt/X11/XlibWrapper.java Mon Sep 23 17:55:36 2013 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XlibWrapper.java Mon Sep 23 21:24:34 2013 +0400
@@ -509,6 +509,7 @@
static native long XkbGetUpdatedMap(long display, long which, long xkb);
static native void XkbFreeKeyboard(long xkb, long which, boolean free_all);
static native boolean XkbTranslateKeyCode(long xkb, int keycode, long mods, long mods_rtrn, long keysym_rtrn);
+ static native void XkbSetDetectableAutoRepeat(long display, boolean detectable);
static native void XConvertCase(long keysym,
--- a/jdk/src/solaris/native/sun/xawt/XlibWrapper.c Mon Sep 23 17:55:36 2013 +0400
+++ b/jdk/src/solaris/native/sun/xawt/XlibWrapper.c Mon Sep 23 21:24:34 2013 +0400
@@ -523,8 +523,12 @@
//printf("native, output: keysym:0x%0X; mods:0x%0X\n", *(unsigned int *)jlong_to_ptr(keysym_rtrn), *(unsigned int *)jlong_to_ptr(mods_rtrn));
return b;
}
-
-
+JNIEXPORT void JNICALL Java_sun_awt_X11_XlibWrapper_XkbSetDetectableAutoRepeat
+(JNIEnv *env, jclass clazz, jlong display, jboolean detectable)
+{
+ AWT_CHECK_HAVE_LOCK();
+ XkbSetDetectableAutoRepeat((Display *) jlong_to_ptr(display), detectable, NULL);
+}
/*
* Class: sun_awt_X11_XlibWrapper
* Method: XNextEvent