-
Bug
-
Resolution: Fixed
-
P3
-
11, 12
-
b21
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8224270 | 11.0.4 | Ichiroh Takiguchi | P3 | Resolved | Fixed | b04 |
Issue:
To turn on or turn off IME via Java, XNPreeditState should be used with
XSetValues().
But it should be nested via XVaCreateNestedList() since XNPreeditState
is a part of XNPreeditAttributes.
Current code is, like:
- ret = XSetICValues(pX11IMData->current_ic, XNPreeditState,
- (enable ? XIMPreeditEnable : XIMPreeditDisable),
NULL);
But it should be, like:
+ pr_atrb = XVaCreateNestedList(0,
+ XNPreeditState, (enable ? XIMPreeditEnable :
XIMPreeditDisable),
+ NULL);
+ ret = XSetICValues(pX11IMData->current_ic, XNPreeditAttributes,
pr_atrb, NULL);
On Linux platform, the issue can check with attached CompositionEnabledTest test program and
kinput2 XIM server and Wnn8 for Linux/BSD (htt).
Test instruction 1:
This testing requires PreeditState enabled XIM server, like kinput2 and htt.
Current version of ibus and fcitx don't work as expected.
1. Compile and run CompositionEnabledTest test program
2. Click JTextField and JButton, then XIM server status may be changed.
If XIM server does not support XNPreeditState, it does not work.
Test instruction 2:
1. Compile and run CompositionEnabledTest test program with following command
$ XMODIFIERS=@im=local java CompositionEnabledTest
(Note: @im=local means, use Xlib's embedded input method
2. Click "Enabled" TextField, then following exception is happened
Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException:
at java.desktop/sun.awt.X11InputMethodBase.setCompositionEnabledNative(Native Method)
at java.desktop/sun.awt.X11InputMethod.setCompositionEnabled(X11InputMethod.java:352)
at java.desktop/sun.awt.im.InputContext.setCompositionEnabled(InputContext.java:731)
at CompositionEnabledTest$MyFocusListener.focusGained(CompositionEnabledTest.java:37)
at java.desktop/java.awt.AWTEventMulticaster.focusGained(AWTEventMulticaster.java:228)
at java.desktop/java.awt.Component.processFocusEvent(Component.java:6521)
at java.desktop/java.awt.Component.processEvent(Component.java:6388)
at java.desktop/java.awt.Container.processEvent(Container.java:2263)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1950)
at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1051)
at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:675)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
To turn on or turn off IME via Java, XNPreeditState should be used with
XSetValues().
But it should be nested via XVaCreateNestedList() since XNPreeditState
is a part of XNPreeditAttributes.
Current code is, like:
- ret = XSetICValues(pX11IMData->current_ic, XNPreeditState,
- (enable ? XIMPreeditEnable : XIMPreeditDisable),
NULL);
But it should be, like:
+ pr_atrb = XVaCreateNestedList(0,
+ XNPreeditState, (enable ? XIMPreeditEnable :
XIMPreeditDisable),
+ NULL);
+ ret = XSetICValues(pX11IMData->current_ic, XNPreeditAttributes,
pr_atrb, NULL);
On Linux platform, the issue can check with attached CompositionEnabledTest test program and
kinput2 XIM server and Wnn8 for Linux/BSD (htt).
Test instruction 1:
This testing requires PreeditState enabled XIM server, like kinput2 and htt.
Current version of ibus and fcitx don't work as expected.
1. Compile and run CompositionEnabledTest test program
2. Click JTextField and JButton, then XIM server status may be changed.
If XIM server does not support XNPreeditState, it does not work.
Test instruction 2:
1. Compile and run CompositionEnabledTest test program with following command
$ XMODIFIERS=@im=local java CompositionEnabledTest
(Note: @im=local means, use Xlib's embedded input method
2. Click "Enabled" TextField, then following exception is happened
Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException:
at java.desktop/sun.awt.X11InputMethodBase.setCompositionEnabledNative(Native Method)
at java.desktop/sun.awt.X11InputMethod.setCompositionEnabled(X11InputMethod.java:352)
at java.desktop/sun.awt.im.InputContext.setCompositionEnabled(InputContext.java:731)
at CompositionEnabledTest$MyFocusListener.focusGained(CompositionEnabledTest.java:37)
at java.desktop/java.awt.AWTEventMulticaster.focusGained(AWTEventMulticaster.java:228)
at java.desktop/java.awt.Component.processFocusEvent(Component.java:6521)
at java.desktop/java.awt.Component.processEvent(Component.java:6388)
at java.desktop/java.awt.Container.processEvent(Container.java:2263)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1950)
at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1051)
at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:675)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
- backported by
-
JDK-8224270 Unix/X11 setCompositionEnableNative issue
- Resolved
- relates to
-
JDK-8227919 8213232 causes crashes on solaris sparc64
- Closed
-
JDK-8343618 Stack smashing in awt_InputMethod.c on Linux s390x
- Open
-
JDK-8227919 8213232 causes crashes on solaris sparc64
- Closed