summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorSilenio Quarti2013-03-26 14:39:15 (EDT)
committer Carolyn MacLeod2013-04-09 10:56:57 (EDT)
commite0aa8cd3eb36e6a67cfeb628309355a1b07cbb1c (patch)
treee27d1888b1108180aa7dafb1e7caaece20b9b8bc
parentdd6ac4b0ea4a4ada08c4eb419b0a73e64bd118c2 (diff)
downloadeclipse.platform.swt-e0aa8cd3eb36e6a67cfeb628309355a1b07cbb1c.zip
eclipse.platform.swt-e0aa8cd3eb36e6a67cfeb628309355a1b07cbb1c.tar.gz
eclipse.platform.swt-e0aa8cd3eb36e6a67cfeb628309355a1b07cbb1c.tar.bz2
Bug 403102 - [GTK3] pointer image is often wrong when moving from editor to view
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
index 0229d47..ec36b15 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
@@ -3283,6 +3283,16 @@ long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ event) {
y = pointer_y [0];
state = mask [0];
}
+ if (OS.GTK3 && this != display.currentControl) {
+ if (display.currentControl != null && !display.currentControl.isDisposed ()) {
+ display.removeMouseHoverTimeout (display.currentControl.handle);
+ display.currentControl.sendMouseEvent (SWT.MouseExit, 0, gdkEvent.time, x, y, false, state);
+ }
+ if (!isDisposed ()) {
+ display.currentControl = this;
+ sendMouseEvent (SWT.MouseEnter, 0, gdkEvent.time, x, y, false, state);
+ }
+ }
int result = sendMouseEvent (SWT.MouseMove, 0, gdkEvent.time, x, y, gdkEvent.is_hint != 0, state) ? 0 : 1;
return result;
}