<AWT Dev> [8] review request JDK-8019282 keyRelesed is reached even though key was NOT released

Anthony Petrov anthony.petrov at oracle.com
Thu Sep 19 13:03:12 PDT 2013


Hi Alexander,

src/solaris/native/sun/xawt/XlibWrapper.c
>  530     XkbSetDetectableAutoRepeat((Display *) jlong_to_ptr(display), detectable, NULL);

I suggest to convert the jboolean "detectable" to Bool explicitly to 
avoid any potential compiler warnings. No need for a new webrev with 
this change. The fix looks fine to me otherwise (though I see no point 
in modifying make/sun/xawt/mapfile-vers - the old build is dead.)

Did you run KeyEvent regression tests with your fix (both open and 
closed)? Also, perhaps TextArea/TextEdit tests (from both AWT and Swing) 
might be worth running as well.

--
best regards,
Anthony

On 09/19/2013 10:38 PM, Alexander Zvegintsev wrote:
> Hello,
> please review fix for
> bug: https://bugs.openjdk.java.net/browse/JDK-8019282
> webrev: http://cr.openjdk.java.net/~serb/8019282/webrev.00
>
> The standard behavior of the X server is to generate a KeyRelease event
> for every KeyPress event.
> That is why we receiving KEY_RELEASED event when auto-repeat feature is
> active.
>
> Fortunately, there is XkbSetDetectableAutoRepeat function:
> http://linux.die.net/man/3/xkbsetdetectableautorepeat
>
> It allows to receive KeyRelease events only when the key is physically
> released (like on Windows).
>


More information about the awt-dev mailing list