summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
index f73886d0bb..0fbe399faf 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
@@ -260,6 +260,15 @@ void _setVisible (boolean visible) {
} else {
OS.SendMessage (hwndParent, OS.WM_CANCELMODE, 0, 0);
}
+ /*
+ * Bug in Windows. After closing a popup menu, the accessibility focus
+ * is not returned to the focus control. This causes confusion for AT users.
+ * The fix is to explicitly set the accessibility focus back to the focus control.
+ */
+ int hFocus = OS.GetFocus();
+ if (hFocus != 0) {
+ OS.NotifyWinEvent (OS.EVENT_OBJECT_FOCUS, hFocus, OS.OBJID_CLIENT, 0);
+ }
}
/**