<AWT Dev> Please review changes in regression test /java/awt/TestArea/UsingWithMouse.java

Anthony Petrov Anthony.Petrov at Sun.COM
Mon Jan 25 10:05:53 PST 2010


Hi Pavel,

I think what you really need to use here instead of Thread.sleep() is the

((sun.awt.SunToolkit)Toolkit.getDefaultToolkit()).realSync();

method which actually ends up in calling the XSync(), and therefore 
makes sure the X server processes the requests we're sending. 
waitForIdle() can't help with that because it only waits for the java 
events to be processed, not the requests to the X server.

Could you try this and see if that fixes the test?

--
best regards,
Anthony

On 1/25/2010 3:53 PM Pavel Tisnovsky wrote:
> Hi,
> 
> please review changes made in regression test 
> /java/awt/TestArea/UsingWithMouse.java.
> 
> Webrev is available at 
> http://cr.openjdk.java.net/~ptisnovs/SelectionAutoscrollTest/
> 
> There's added small delay between each scroll event, so the scrolling 
> (and related text selection by mouse cursor) is really performed on 
> Gnome. Tested on RHEL x86_64 with Gnome installed. I also tried to use 
> only Util.waitForIdle(robot) instead of Thread.sleep() but this does not 
> help in this case.
> 
> This patch can be applied to OpenJDK7 too.
> 
> Thanks in advance
> Pavel Tisnovsky
> Red Hat QA
> 


More information about the jdk6-dev mailing list