提交 93dd7e60 编写于 作者: Y yan

6454041: decimal separator munches the character standing at the right (sk keyboard)

Summary: in a group of keysyms associated with a key, check for keypad-ness of more keysyms
Reviewed-by: art
上级 042de0b4
......@@ -101,10 +101,15 @@ public class XKeysym {
// Otherwise, it is [1].
int ndx = XToolkit.isXsunServer() &&
! XToolkit.isXKBenabled() ? 2 : 1;
// Even if XKB is enabled, we have another problem: some symbol tables (e.g. cz) force
// a regular comma instead of KP_comma for a decimal separator. Result is,
// bugs like 6454041. So, we will try for keypadness a keysym with ndx==0 as well.
XToolkit.awtLock();
try {
return XlibWrapper.IsKeypadKey(
XlibWrapper.XKeycodeToKeysym(ev.get_display(), ev.get_keycode(), ndx ) );
return (XlibWrapper.IsKeypadKey(
XlibWrapper.XKeycodeToKeysym(ev.get_display(), ev.get_keycode(), ndx ) ) ||
XlibWrapper.IsKeypadKey(
XlibWrapper.XKeycodeToKeysym(ev.get_display(), ev.get_keycode(), 0 ) ));
} finally {
XToolkit.awtUnlock();
}
......
......@@ -139,10 +139,15 @@ tojava // Xsun without XKB uses keysymarray[2] keysym to determine if it
tojava // Otherwise, it is [1].
tojava int ndx = XToolkit.isXsunServer() &&
tojava ! XToolkit.isXKBenabled() ? 2 : 1;
tojava // Even if XKB is enabled, we have another problem: some symbol tables (e.g. cz) force
tojava // a regular comma instead of KP_comma for a decimal separator. Result is,
tojava // bugs like 6454041. So, we will try for keypadness a keysym with ndx==0 as well.
tojava XToolkit.awtLock();
tojava try {
tojava return XlibWrapper.IsKeypadKey(
tojava XlibWrapper.XKeycodeToKeysym(ev.get_display(), ev.get_keycode(), ndx ) );
tojava return (XlibWrapper.IsKeypadKey(
tojava XlibWrapper.XKeycodeToKeysym(ev.get_display(), ev.get_keycode(), ndx ) ) ||
tojava XlibWrapper.IsKeypadKey(
tojava XlibWrapper.XKeycodeToKeysym(ev.get_display(), ev.get_keycode(), 0 ) ));
tojava } finally {
tojava XToolkit.awtUnlock();
tojava }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册