8225101: Crash at sun.awt.X11.XlibWrapper.XkbGetUpdatedMap when change keybord map

Reviewed-by: prr, pbansal
This commit is contained in:
Sergey Bylokhov 2019-09-12 22:20:35 -07:00
parent 38c425df73
commit 0356d202b6

View File

@ -2558,14 +2558,16 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
//System.out.println("XkbNewKeyboard:"+(xke.get_new_kbd()));
break;
case XConstants.XkbMapNotify :
//TODO: provide a simple unit test.
XlibWrapper.XkbGetUpdatedMap(getDisplay(),
XConstants.XkbKeyTypesMask |
XConstants.XkbKeySymsMask |
XConstants.XkbModifierMapMask |
XConstants.XkbVirtualModsMask,
awt_XKBDescPtr);
//System.out.println("XkbMap:"+(xke.get_map()));
if (awt_XKBDescPtr != 0) {
//TODO: provide a simple unit test.
XlibWrapper.XkbGetUpdatedMap(getDisplay(),
XConstants.XkbKeyTypesMask |
XConstants.XkbKeySymsMask |
XConstants.XkbModifierMapMask |
XConstants.XkbVirtualModsMask,
awt_XKBDescPtr);
}
//System.out.println("XkbMap:"+(xke.get_map()));
break;
case XConstants.XkbStateNotify :
// May use it later e.g. to obtain an effective group etc.