summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti <silenio_quarti@ca.ibm.com>2012-06-22 12:36:08 -0400
committerSilenio Quarti <silenio_quarti@ca.ibm.com>2012-06-22 12:36:08 -0400
commit066de63c98ed4e9f7a0fb031abd659c80a8f3c05 (patch)
treec249f253ae8e97dc49a970abade0815cf1feeb00
parentbc1f2a9d02519d239d8d6cc4e33217fb1f90b473 (diff)
downloadeclipse.platform.swt-066de63c98ed4e9f7a0fb031abd659c80a8f3c05.tar.gz
eclipse.platform.swt-066de63c98ed4e9f7a0fb031abd659c80a8f3c05.tar.xz
eclipse.platform.swt-066de63c98ed4e9f7a0fb031abd659c80a8f3c05.zip
Bug 383328 - Multiple MoseHover events without moving the mouse
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
index 8b7c8daf1f..798f1d6189 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
@@ -634,7 +634,11 @@ void checkEnterExit (Control control, NSEvent nsEvent, boolean send) {
}
setCursor (control);
}
- timerExec (control != null && !control.isDisposed() ? getToolTipTime () : -1, hoverTimer);
+ NSPoint location = NSEvent.mouseLocation();
+ if (control == null || control != currentControl || hoverLastLocation == null || location.x != hoverLastLocation.x || location.y != hoverLastLocation.y) {
+ hoverLastLocation = location;
+ timerExec (control != null && !control.isDisposed() ? getToolTipTime () : -1, hoverTimer);
+ }
}
void checkFocus () {
@@ -4214,6 +4218,7 @@ public static void setAppVersion (String version) {
}
//TODO use custom timer instead of timerExec
+NSPoint hoverLastLocation;
Runnable hoverTimer = new Runnable () {
public void run () {
if (currentControl != null && !currentControl.isDisposed()) {