Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikita Nemkin2019-06-20 09:49:39 +0000
committerNikita Nemkin2019-06-20 09:49:39 +0000
commit5a7ca38efb361afe4616cfe6bee65e67c33fb22d (patch)
tree578ba406e1d01be8edfb8dbd596fa47919b1f212
parent44dcb615a57b41cb03a5d4cee9d9970845ed6430 (diff)
downloadeclipse.platform.swt-5a7ca38efb361afe4616cfe6bee65e67c33fb22d.tar.gz
eclipse.platform.swt-5a7ca38efb361afe4616cfe6bee65e67c33fb22d.tar.xz
eclipse.platform.swt-5a7ca38efb361afe4616cfe6bee65e67c33fb22d.zip
Bug 538649 - [Win32] Accessibility: Toolbar buttons losing keyboard focus
SWT saves and restores the last highlighted toolbar item between focus changes (native behavior is to always highlight the first item). Fix the case when the saved item had been disabled. Change-Id: I5e142fed99ea014bb0532ebb99d02e44273d1f92 Signed-off-by: Nikita Nemkin <nikita@nemkin.ru>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java
index ccc6c3ca2f..2f9ed371a1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java
@@ -663,6 +663,9 @@ public void setEnabled (boolean enabled) {
if ((style & SWT.SEPARATOR) == 0) {
if (image != null) updateImages (enabled && parent.getEnabled ());
}
+ if (!enabled && parent.lastFocusId == id) {
+ parent.lastFocusId = -1;
+ }
}
/**

Back to the top