Bug 376011 - [accessibility] Eclipse 4.2 tab traversal needs refining
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 6cdacc9..14a41ac 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
@@ -2988,7 +2988,7 @@
result = sendMouseEvent (SWT.MouseDoubleClick, gdkEvent.button, display.clickCount, 0, false, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1;
if (isDisposed ()) return 1;
}
- if (!shell.isDisposed ()) shell.setActiveControl (this);
+ if (!shell.isDisposed ()) shell.setActiveControl (this, SWT.MouseDown);
return result;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
index 4a349ac..6cd7da5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
@@ -1635,6 +1635,10 @@
}
void setActiveControl (Control control) {
+ setActiveControl (control, SWT.None);
+}
+
+void setActiveControl (Control control, int type) {
if (control != null && control.isDisposed ()) control = null;
if (lastActive != null && lastActive.isDisposed ()) lastActive = null;
if (lastActive == control) return;
@@ -1666,7 +1670,9 @@
}
for (int i=activate.length-1; i>=index; --i) {
if (!activate [i].isDisposed ()) {
- activate [i].sendEvent (SWT.Activate);
+ Event event = new Event ();
+ event.detail = type;
+ activate [i].sendEvent (SWT.Activate, event);
}
}
}