Project: SWT
Bug 94502 Redundant check for the pointer coordinates
Reported: 2005-05-10 16:03:20 | Status: resolved fixed

In Control#gtk_motion_notify, gdk_window_get_pointer() is used to get the coordinates relative to the root window. However, Control#sendMouseEvent maps these back into widget-relative coordinates. It would be more efficient and straightforward to simply request the mouse position relative to the target window in the first place. The attached patch solves this.

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java