Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Singer2019-04-18 12:04:08 +0000
committerNiraj Modi2019-04-19 13:58:53 +0000
commit0690afd9d03b85f3411f5bb50b78d6f900b0fc56 (patch)
tree81af0ffc09dc5cc83da018fa83834f829228e30b /bundles
parentd1a3c4b93f95ccf82a45f84acedb4b4d753bb4bd (diff)
downloadeclipse.platform.swt-0690afd9d03b85f3411f5bb50b78d6f900b0fc56.tar.gz
eclipse.platform.swt-0690afd9d03b85f3411f5bb50b78d6f900b0fc56.tar.xz
eclipse.platform.swt-0690afd9d03b85f3411f5bb50b78d6f900b0fc56.zip
Bug 493148 - [Win32] Non-editable StyledText can be changed by typing Chinese using IME
Change-Id: I0a67a1b576abae0c02e4cbcdc469bb786a8a9ecd Signed-off-by: Thomas Singer <ts-swt@syntevo.com>
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
index 4d23d60e73..487e18bfaf 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
@@ -5806,6 +5806,14 @@ void installListeners() {
addListener(SWT.Resize, listener);
addListener(SWT.Traverse, listener);
ime.addListener(SWT.ImeComposition, event -> {
+ if (!editable) {
+ event.doit = false;
+ event.start = 0;
+ event.end = 0;
+ event.text = "";
+ return;
+ }
+
switch (event.detail) {
case SWT.COMPOSITION_SELECTION: handleCompositionSelection(event); break;
case SWT.COMPOSITION_CHANGED: handleCompositionChanged(event); break;

Back to the top