From: <gjo...@us...> - 2007-10-30 20:06:12
|
Revision: 2603 http://abbot.svn.sourceforge.net/abbot/?rev=2603&view=rev Author: gjohnsto Date: 2007-10-30 13:06:03 -0700 (Tue, 30 Oct 2007) Log Message: ----------- Padded double-click avoidance pause for Windows. Modified Paths: -------------- abbot.swt/trunk/abbot.swt/src/abbot/swt/Robot.java Modified: abbot.swt/trunk/abbot.swt/src/abbot/swt/Robot.java =================================================================== --- abbot.swt/trunk/abbot.swt/src/abbot/swt/Robot.java 2007-10-30 19:19:55 UTC (rev 2602) +++ abbot.swt/trunk/abbot.swt/src/abbot/swt/Robot.java 2007-10-30 20:06:03 UTC (rev 2603) @@ -422,9 +422,11 @@ if ((buttons & SWT.BUTTON1) != 0) postMouseRelease(1); } + + private static final long DoubleClickPadding = 200L; private void avoidDoubleClick(long extra) { - long time = clickstamp + doubleClickTime + extra + long time = clickstamp + doubleClickTime + DoubleClickPadding + extra - System.currentTimeMillis(); if (time > 0) sleep(time); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |