diff options
author | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-10-25 15:14:24 -0400 |
---|---|---|
committer | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-10-25 15:14:24 -0400 |
commit | af054a0a011d7fb2ae5e53f517022bb49231bb94 (patch) | |
tree | 34b9756499450ccb3fff6320e11c3b0a29f5c17e /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java | |
parent | 4de42eea287c8825d0a8fcad58d1afe3cfc7c290 (diff) | |
download | eclipse.platform.swt-af054a0a011d7fb2ae5e53f517022bb49231bb94.tar.gz eclipse.platform.swt-af054a0a011d7fb2ae5e53f517022bb49231bb94.tar.xz eclipse.platform.swt-af054a0a011d7fb2ae5e53f517022bb49231bb94.zip |
Bug 387315 - Use gtk_entry_im_context_filter_keypress to omit direct ImContext call
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java index faec386acb..5c3a5c9bdd 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java @@ -45,6 +45,7 @@ import org.eclipse.swt.events.*; public class Spinner extends Composite { static final int MIN_ARROW_WIDTH = 6; int lastEventTime = 0; + long /*int*/ imContext; long /*int*/ gdkEventKey = 0; int fixStart = -1, fixEnd = -1; double climbRate = 1; @@ -299,6 +300,9 @@ void createHandle (int index) { OS.gtk_editable_set_editable (handle, (style & SWT.READ_ONLY) == 0); OS.gtk_entry_set_has_frame (handle, (style & SWT.BORDER) != 0); OS.gtk_spin_button_set_wrap (handle, (style & SWT.WRAP) != 0); + if (OS.GTK_VERSION >= OS.VERSION (3, 0, 0)) { + imContext = OS.imContextLast(); + } } /** @@ -759,6 +763,7 @@ void hookEvents () { } long /*int*/ imContext () { + if (imContext != 0) return imContext; return OS.GTK_ENTRY_IM_CONTEXT (handle); } |