Bug 522140: [GTK3] Horizontal SashForm resize problem

Use lastX instead of rect.x in Sash.gtk_motion_notify_event(). LastX is
set to rect.x only when event.doit is true, which is the case in 99% of
use cases. However when resizing quickly, event.doit is not true, so
calling setBounds() on rect.x is incorrect.

Using lastX checks for event.doit which avoids this bug by not calling
setBounds() with rect.x as the x coordinate.

Tested on GTK3.22 in the IDE and ControlExample. No AllNonBrowser JUnit
tests fail.

Change-Id: I4661cae8df947a953e273b48d851254579fd163b
Signed-off-by: Eric Williams <ericwill@redhat.com>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java
index e649080..d9d9121 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java
@@ -413,7 +413,11 @@
 	parent.update (true, (style & SWT.SMOOTH) == 0);
 	drawBand (lastX, lastY, width, height);
 	if ((style & SWT.SMOOTH) != 0) {
-		setBoundsInPixels (rect.x, lastY, width, height);
+		/*
+		 * Use lastX instead of rect.x, as lastX takes into account
+		 * the event.doit flag. See bug 522140.
+		 */
+		setBoundsInPixels (lastX, lastY, width, height);
 		// widget could be disposed at this point
 	}
 	return result;