You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running tests on Mac OS X (10.8.4) and Java 7 (1.7.0_21-b12) the mouse pointer jitters over text fields and takes dozens of seconds before it finally clicks on them. The tests don't really fail but become slow enough to prevent from building.
Emmanuel Puybaret (author of 2 books on Java) found the following workaround. The System property resolution should go in a constant but we favored readability.
org.fest.swing.monitor.WindowStatus
@RunsInEDT
private void mouseMove(final Window w, Point point) {
final int x = point.x;
final int y = point.y;
if (x == 0 || y == 0) return;
robot.mouseMove(x, y);
// ************************
// EP : Dispatch missing MouseEvent under Mac OS X / Java 7
if (System.getProperty("os.name").startsWith("Mac OS X")
&& System.getProperty("java.version").startsWith("1.7")
&& w.isShowing()
&& w.getBounds().contains(x, y)) {
java.awt.EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
w.dispatchEvent(new java.awt.event.MouseEvent(w, java.awt.event.MouseEvent.MOUSE_MOVED,
System.currentTimeMillis(), 0, x - w.getX(), y - w.getY(), x, y, 0, false, 0));
}
});
}
// EP : End of modification
// ************************
Dimension windowSize = sizeOf(w);
if (windowSize.width > windowSize.height) robot.mouseMove(x + sign, y);
else robot.mouseMove(x, y + sign);
sign = -sign;
}
The text was updated successfully, but these errors were encountered:
When running tests on Mac OS X (10.8.4) and Java 7 (1.7.0_21-b12) the mouse pointer jitters over text fields and takes dozens of seconds before it finally clicks on them. The tests don't really fail but become slow enough to prevent from building.
Emmanuel Puybaret (author of 2 books on Java) found the following workaround. The System property resolution should go in a constant but we favored readability.
The text was updated successfully, but these errors were encountered: