Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarolyn MacLeod2013-04-05 14:54:42 +0000
committerCarolyn MacLeod2013-04-05 14:54:42 +0000
commit868d20d9606c2e8b0b0b779262a70660ff624466 (patch)
tree21c13b20a20e8adfb3e755d6d473ab30e629eb0b
parentf74497793aef8df4597d72016316e17cd04a7b1b (diff)
downloadeclipse.platform.swt-868d20d9606c2e8b0b0b779262a70660ff624466.tar.gz
eclipse.platform.swt-868d20d9606c2e8b0b0b779262a70660ff624466.tar.xz
eclipse.platform.swt-868d20d9606c2e8b0b0b779262a70660ff624466.zip
Bug 376011 - [accessibility] Eclipse 4.2 tab traversal needs refining
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java10
3 files changed, 14 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java
index 4d7e967df4..b2f8cdd8cb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java
@@ -2076,6 +2076,7 @@ public class OS extends C {
public static final int VT_LPWSTR = 31;
public static final short VARIANT_TRUE = -1;
public static final short VARIANT_FALSE = 0;
+ public static final short WA_CLICKACTIVE = 2;
public static final String WC_HEADER = "SysHeader32"; //$NON-NLS-1$
public static final String WC_LINK = "SysLink"; //$NON-NLS-1$
public static final String WC_LISTVIEW = "SysListView32"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
index 14e1ac5626..60fdbe6711 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
@@ -1650,7 +1650,8 @@ LRESULT WM_ACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
return LRESULT.ZERO;
}
}
- if (OS.LOWORD (wParam) != 0) {
+ int loWord = OS.LOWORD (wParam);
+ if (loWord != 0) {
/*
* When the high word of wParam is non-zero, the activation
* state of the window is being changed while the window is
@@ -1661,7 +1662,9 @@ LRESULT WM_ACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
Control control = display.findControl (lParam);
if (control == null || control instanceof Shell) {
if (this instanceof Shell) {
- sendEvent (SWT.Activate);
+ Event event = new Event ();
+ event.detail = loWord == OS.WA_CLICKACTIVE ? SWT.MouseDown : SWT.None;
+ sendEvent (SWT.Activate, event);
if (isDisposed ()) return LRESULT.ZERO;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java
index 976fab44c5..c0532c70b8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java
@@ -1413,6 +1413,10 @@ public void setActive () {
}
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;
@@ -1444,7 +1448,9 @@ void setActiveControl (Control control) {
}
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);
}
}
}
@@ -2325,7 +2331,7 @@ LRESULT WM_MOUSEACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
}
long /*int*/ code = callWindowProc (handle, OS.WM_MOUSEACTIVATE, wParam, lParam);
- setActiveControl (control);
+ setActiveControl (control, SWT.MouseDown);
return new LRESULT (code);
}

Back to the top