diff options
author | Felipe Heidrich <fheidric> | 2007-08-23 21:06:11 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2007-08-23 21:06:11 +0000 |
commit | 86993c3e51773da3914b0c9262ade1d56b8ae954 (patch) | |
tree | 3ed17a348c3fc764812de55e70967eb1ea0aa953 | |
parent | f51ab444236b31f138941645972a6c992952ac84 (diff) | |
download | eclipse.platform.swt-86993c3e51773da3914b0c9262ade1d56b8ae954.tar.gz eclipse.platform.swt-86993c3e51773da3914b0c9262ade1d56b8ae954.tar.xz eclipse.platform.swt-86993c3e51773da3914b0c9262ade1d56b8ae954.zip |
*** empty log message ***
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java | 15 | ||||
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java | 2 |
2 files changed, 11 insertions, 6 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java index 0b6443efd7..89445a4c69 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java @@ -170,6 +170,11 @@ TF_DISPLAYATTRIBUTE getDisplayAttribute (short langid, int attInfo) { return pda; } +boolean isInlineIMEEnabled () { + if (OS.IsWinCE || OS.WIN32_VERSION < OS.VERSION (5, 1)) return false; + return OS.IsDBLocale && hooks (SWT.ImeComposition); +} + void releaseChildren (boolean destroy) { if (caret != null) { caret.release (false); @@ -354,7 +359,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /* LRESULT WM_IME_COMPOSITION (int /*long*/ wParam, int /*long*/ lParam) { LRESULT result = super.WM_IME_COMPOSITION (wParam, lParam); - if (OS.IsDBLocale && hooks (SWT.ImeComposition)) { + if (isInlineIMEEnabled ()) { int /*long*/ hIMC = OS.ImmGetContext (handle); if (hIMC != 0) { TCHAR buffer = null; @@ -519,7 +524,7 @@ LRESULT WM_IME_COMPOSITION (int /*long*/ wParam, int /*long*/ lParam) { LRESULT WM_IME_COMPOSITION_START (int /*long*/ wParam, int /*long*/ lParam) { LRESULT result = super.WM_IME_COMPOSITION_START (wParam, lParam); - if (OS.IsDBLocale && hooks (SWT.ImeComposition)) { + if (isInlineIMEEnabled ()) { return LRESULT.ONE; } return result; @@ -527,7 +532,7 @@ LRESULT WM_IME_COMPOSITION_START (int /*long*/ wParam, int /*long*/ lParam) { LRESULT WM_IME_ENDCOMPOSITION (int /*long*/ wParam, int /*long*/ lParam) { LRESULT result = super.WM_IME_ENDCOMPOSITION (wParam, lParam); - if (OS.IsDBLocale && hooks (SWT.ImeComposition)) { + if (isInlineIMEEnabled ()) { return LRESULT.ONE; } return result; @@ -543,7 +548,7 @@ LRESULT WM_INPUTLANGCHANGE (int /*long*/ wParam, int /*long*/ lParam) { } LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) { - if (OS.IsDBLocale && hooks (SWT.ImeComposition)) { + if (isInlineIMEEnabled ()) { int /*long*/ hIMC = OS.ImmGetContext (handle); if (hIMC != 0) { if (OS.ImmGetOpenStatus (hIMC)) { @@ -558,7 +563,7 @@ LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) { } LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) { - if (OS.IsDBLocale && hooks (SWT.ImeComposition)) { + if (isInlineIMEEnabled ()) { int /*long*/ hIMC = OS.ImmGetContext (handle); if (hIMC != 0) { if (OS.ImmGetOpenStatus (hIMC)) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java index ab572154c0..3c99b5dd17 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java @@ -264,7 +264,7 @@ void resizeIME () { if (!OS.GetCaretPos (ptCurrentPos)) return; int /*long*/ hwnd = parent.handle; int /*long*/ hIMC = OS.ImmGetContext (hwnd); - if (parent.hooks (SWT.ImeComposition)) { + if (parent.isInlineIMEEnabled ()) { CANDIDATEFORM lpCandidate = new CANDIDATEFORM (); lpCandidate.dwStyle = OS.CFS_CANDIDATEPOS; lpCandidate.ptCurrentPos = ptCurrentPos; |