diff options
author | Felipe Heidrich <Felipe_Heidrich@ca.ibm.com> | 2011-07-14 10:46:45 -0400 |
---|---|---|
committer | Felipe Heidrich <Felipe_Heidrich@ca.ibm.com> | 2011-07-14 10:46:45 -0400 |
commit | 19497a80620870a4c6de27fc22fe0142080bccae (patch) | |
tree | 6b751fcad5feb4b09e39ea936597537525a974ef /bundles/org.eclipse.swt | |
parent | 781bc473ae283b52db11df96bd63b6ac78600870 (diff) | |
download | eclipse.platform.swt-19497a80620870a4c6de27fc22fe0142080bccae.tar.gz eclipse.platform.swt-19497a80620870a4c6de27fc22fe0142080bccae.tar.xz eclipse.platform.swt-19497a80620870a4c6de27fc22fe0142080bccae.zip |
Bug 347490 - Shell.setImeInputMode(int mode) does not always set IME
flags as expected, and causes Chinese IME single space mode changes to
double space.
Diffstat (limited to 'bundles/org.eclipse.swt')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java index 12021c19a2..464589f9a6 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java @@ -52,6 +52,7 @@ public class OS extends C { public static final int SM_DBCSENABLED = 0x2A; public static final int SM_IMMENABLED = 0x52; public static final int LANG_KOREAN = 0x12; + public static final int LANG_JAPANESE = 0x11; public static final int MAX_PATH = 260; /* Get the Windows version and the flags */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java index e9dd9de46e..eb6a6aca64 100755..100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java @@ -1594,7 +1594,15 @@ public void setImeInputMode (int mode) { oldBits = OS.IME_CMODE_KATAKANA; } } - if ((mode & (SWT.DBCS | SWT.NATIVE)) != 0) { + boolean fullShape = (mode & SWT.DBCS) != 0; + if ((mode & SWT.NATIVE) != 0) { + int /*long*/ hkl = OS.GetKeyboardLayout (0); + int langid = OS.PRIMARYLANGID (OS.LOWORD (hkl)); + if (langid == OS.LANG_JAPANESE) { + fullShape = true; + } + } + if (fullShape) { newBits |= OS.IME_CMODE_FULLSHAPE; } else { oldBits |= OS.IME_CMODE_FULLSHAPE; |