Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarolyn MacLeod2013-04-05 15:25:26 +0000
committerCarolyn MacLeod2013-04-05 15:25:26 +0000
commit9a0fd6cabc745a95bd4e129cc1b90caaddedf1b0 (patch)
tree4361ceb76fa8321c891456e3629ce8d40ffa5ee2 /bundles
parentf3bf83cbc3a1d6e5994a71cf825cdb25e2407e27 (diff)
downloadeclipse.platform.swt-9a0fd6cabc745a95bd4e129cc1b90caaddedf1b0.tar.gz
eclipse.platform.swt-9a0fd6cabc745a95bd4e129cc1b90caaddedf1b0.tar.xz
eclipse.platform.swt-9a0fd6cabc745a95bd4e129cc1b90caaddedf1b0.zip
Bug 376011 - [accessibility] Eclipse 4.2 tab traversal needs refining
Diffstat (limited to 'bundles')
-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 145a849d64..12c10b8d0d 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 27fd287fb4..0ca46d6557 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 (int /*long*/ wParam, int /*long*/ 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 (int /*long*/ wParam, int /*long*/ 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 eb6a6aca64..b6283eec86 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 (int /*long*/ wParam, int /*long*/ lParam) {
}
int /*long*/ code = callWindowProc (handle, OS.WM_MOUSEACTIVATE, wParam, lParam);
- setActiveControl (control);
+ setActiveControl (control, SWT.MouseDown);
return new LRESULT (code);
}

Back to the top