summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnatoly Spektor <aspektor@redhat.com>2012-08-27 08:52:59 -0400
committerAnatoly Spektor <aspektor@redhat.com>2012-08-27 08:52:59 -0400
commit4764388a0a9afb9e042874f30979a69aae6fd14c (patch)
tree495e9aa5d786f3bd606d8abba48ad3a0adc812b2
parent01a5fef0c0e5c76e8d94f1625f1a7e2ec2040e4e (diff)
parentddd37d85332b6f06048142632a9d3dfc9239b814 (diff)
downloadeclipse.platform.swt-4764388a0a9afb9e042874f30979a69aae6fd14c.tar.gz
eclipse.platform.swt-4764388a0a9afb9e042874f30979a69aae6fd14c.tar.xz
eclipse.platform.swt-4764388a0a9afb9e042874f30979a69aae6fd14c.zip
Merge branch 'master' of http://git.eclipse.org/gitroot/platform/eclipse.platform.swt.git
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java11
2 files changed, 6 insertions, 7 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
index b34449a7ea..942aa0c249 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
@@ -341,7 +341,7 @@ void clearText () {
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
- if ((style & SWT.READ_ONLY) != 0) {
+ if ((style & SWT.READ_ONLY) != 0 || menuHandle != 0) {
return computeNativeSize (handle, wHint, hHint, changed);
}
if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
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 ec35babb3f..fb6ac2cc49 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
@@ -3100,19 +3100,18 @@ int /*long*/ gtk_focus_out_event (int /*long*/ widget, int /*long*/ event) {
}
int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) {
+ if (!hasFocus ()) return 0;
GdkEventKey gdkEvent = new GdkEventKey ();
OS.memmove (gdkEvent, event, GdkEventKey.sizeof);
-
- if (filterKey (gdkEvent.keyval, event)) return 1;
- // widget could be disposed at this point
- if (isDisposed ()) return 0;
-
- if (!hasFocus ()) return 0;
if (translateMnemonic (gdkEvent.keyval, gdkEvent)) return 1;
// widget could be disposed at this point
if (isDisposed ()) return 0;
+ if (filterKey (gdkEvent.keyval, event)) return 1;
+ // widget could be disposed at this point
+ if (isDisposed ()) return 0;
+
if (translateTraversal (gdkEvent)) return 1;
// widget could be disposed at this point
if (isDisposed ()) return 0;