Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Heidrich2007-09-05 21:54:38 +0000
committerFelipe Heidrich2007-09-05 21:54:38 +0000
commit7654e11eaa896fc69eee7886848035cf70900559 (patch)
tree2d354a5bfa73c3ce97b52696acd7d1b33fb32fc4
parentfaa9e5841ed055e38dfb93a7a94ba6ff339b98c0 (diff)
downloadeclipse.platform.swt-7654e11eaa896fc69eee7886848035cf70900559.tar.gz
eclipse.platform.swt-7654e11eaa896fc69eee7886848035cf70900559.tar.xz
eclipse.platform.swt-7654e11eaa896fc69eee7886848035cf70900559.zip
Bug 201716 VerifyKeyListener broken
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java1
2 files changed, 4 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
index d270f2f518..990c4e2825 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
@@ -2433,7 +2433,7 @@ int /*long*/ gtk_commit (int /*long*/ imcontext, int /*long*/ text) {
OS.memmove (buffer, text, length);
chars = Converter.mbcsToWcs (null, buffer);
}
- if (hooks(SWT.ImeComposition)) {
+ if (hooks(SWT.ImeComposition) && display.inComposition) {
Event event = new Event();
event.detail = SWT.COMPOSITION_CHANGED;
event.text = chars != null ? new String(chars) : "";
@@ -2445,6 +2445,7 @@ int /*long*/ gtk_commit (int /*long*/ imcontext, int /*long*/ text) {
if (chars != null && doit) {
sendIMKeyEvent (SWT.KeyDown, null, chars);
}
+ display.inComposition = false;
return 0;
}
@@ -2753,6 +2754,7 @@ int /*long*/ gtk_preedit_changed (int /*long*/ imcontext) {
OS.g_free (preeditString [0]);
}
if (chars != null) {
+ display.inComposition = true;
Event event = new Event ();
event.detail = SWT.COMPOSITION_CHANGED;
event.text = new String (chars);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
index 9f7afe2311..853e526c67 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
@@ -143,6 +143,7 @@ public class Display extends Device {
/* Input method resources */
Control imControl;
int /*long*/ preeditWindow, preeditLabel;
+ boolean inComposition;
/* Sync/Async Widget Communication */
Synchronizer synchronizer = new Synchronizer (this);

Back to the top