Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2012-10-23 15:39:50 +0000
committerSilenio Quarti2012-10-23 15:39:50 +0000
commit26bd6aad3363f6d1b254085e150b94f64d1b104f (patch)
tree521ceee977f31a906795a0f0bc1bf80498cba2c6
parent41646b278ce999adc80afe17263f6f9483b90045 (diff)
downloadeclipse.platform.swt-26bd6aad3363f6d1b254085e150b94f64d1b104f.tar.gz
eclipse.platform.swt-26bd6aad3363f6d1b254085e150b94f64d1b104f.tar.xz
eclipse.platform.swt-26bd6aad3363f6d1b254085e150b94f64d1b104f.zip
Bug 381974 - DBCS4.2: Can not choose Hanzi on Text editor with AIX T/S-Chinese IME
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java15
1 files changed, 14 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 3e52e24efd..8388fa897f 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
@@ -3066,7 +3066,20 @@ long /*int*/ gtk_focus_out_event (long /*int*/ widget, long /*int*/ event) {
}
long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) {
- if (!hasFocus ()) return 0;
+ if (!hasFocus ()) {
+ /*
+ * Feature in GTK. On AIX, the IME window deactivates the current shell and even
+ * though the widget receiving the key event is not in focus, it should filter the input in
+ * order to get it committed. The fix is to detect that the widget shell is not active
+ * and call filterKey() only.
+ */
+ if (display.getActiveShell () == null) {
+ GdkEventKey gdkEvent = new GdkEventKey ();
+ OS.memmove (gdkEvent, event, GdkEventKey.sizeof);
+ if (filterKey (gdkEvent.keyval, event)) return 1;
+ }
+ return 0;
+ }
GdkEventKey gdkEvent = new GdkEventKey ();
OS.memmove (gdkEvent, event, GdkEventKey.sizeof);

Back to the top