aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2014-03-25 06:03:37 (EDT)
committerArun Thondapu2014-03-25 10:02:11 (EDT)
commite01c3a3f02055b3ed235cab43fec2df84066bbed (patch)
tree0b7b48a27636d7105cd71b99873b638df2885d29
parent16363606ad658f68c45812590814f59f90facb35 (diff)
downloadeclipse.platform.swt-e01c3a3f02055b3ed235cab43fec2df84066bbed.zip
eclipse.platform.swt-e01c3a3f02055b3ed235cab43fec2df84066bbed.tar.gz
eclipse.platform.swt-e01c3a3f02055b3ed235cab43fec2df84066bbed.tar.bz2
Bug 428091 - [Accessibility] Performance problems in source editors whenv4423arefs/changes/46/23846/2
screenreader Jaws is running Change-Id: I10d5c9d218fc9a2a82cc67c2549764556365a6d4 Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java29
1 files changed, 15 insertions, 14 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java
index 169d0e7..c710a2e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java
@@ -52,7 +52,8 @@ public class Accessible {
static final String PROPERTY_USEIA2 = "org.eclipse.swt.accessibility.UseIA2"; //$NON-NLS-1$
static boolean UseIA2 = true;
static int UniqueID = -0x10;
- int refCount = 0, enumIndex = 0, textCaretCount = 0;
+ int refCount = 0, enumIndex = 0;
+ Runnable timer;
COMObject objIAccessible, objIEnumVARIANT, objIServiceProvider, objIAccessible2, objIAccessibleAction,
objIAccessibleApplication, /*objIAccessibleComponent,*/ objIAccessibleEditableText, objIAccessibleHyperlink,
objIAccessibleHypertext, /*objIAccessibleImage,*/ objIAccessibleTable2, objIAccessibleTableCell,
@@ -1494,20 +1495,20 @@ public class Accessible {
* @since 3.0
*/
public void textCaretMoved (int index) {
- textCaretCount++;
checkWidget();
- Display.getDefault().timerExec(SCROLL_RATE, new Runnable() {
- final int lCount = textCaretCount;
- public void run() {
- if (textCaretCount != lCount) return;
- if (!isATRunning ()) return;
- if (DEBUG) print(this + ".NotifyWinEvent EVENT_OBJECT_LOCATIONCHANGE hwnd=" + control.handle + " childID=" + eventChildID());
- COM.NotifyWinEvent (COM.EVENT_OBJECT_LOCATIONCHANGE, control.handle, COM.OBJID_CARET, eventChildID());
- if (!UseIA2) return;
- if (DEBUG) print(this + ".NotifyWinEvent IA2_EVENT_TEXT_CARET_MOVED hwnd=" + control.handle + " childID=" + eventChildID());
- COM.NotifyWinEvent (COM.IA2_EVENT_TEXT_CARET_MOVED, control.handle, COM.OBJID_CLIENT, eventChildID());
- }
- });
+ if (timer == null) {
+ timer = new Runnable() {
+ public void run() {
+ if (!isATRunning ()) return;
+ if (DEBUG) print(this + ".NotifyWinEvent EVENT_OBJECT_LOCATIONCHANGE hwnd=" + control.handle + " childID=" + eventChildID());
+ COM.NotifyWinEvent (COM.EVENT_OBJECT_LOCATIONCHANGE, control.handle, COM.OBJID_CARET, eventChildID());
+ if (!UseIA2) return;
+ if (DEBUG) print(this + ".NotifyWinEvent IA2_EVENT_TEXT_CARET_MOVED hwnd=" + control.handle + " childID=" + eventChildID());
+ COM.NotifyWinEvent (COM.IA2_EVENT_TEXT_CARET_MOVED, control.handle, COM.OBJID_CLIENT, eventChildID());
+ }
+ };
+ }
+ Display.getDefault().timerExec(SCROLL_RATE, timer);
}
/**