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

Pavel Tisnovsky ptisnovs at redhat.com
Mon Jan 25 11:24:13 PST 2010

Hi Anthony,

thank you for the tip, I'll try to use realSync(), it seems to be the best solution.


----- Original Message -----
From: Anthony Petrov <Anthony.Petrov at Sun.COM>
To: Pavel Tisnovsky <ptisnovs at redhat.com>
Cc: awt-dev at openjdk.java.net, jdk6-dev at openjdk.java.net
Sent: Mon, 25 Jan 2010 13:05:53 -0500 (EST)
Subject: Re: <AWT Dev> Please review changes in regression test /java/awt/TestArea/UsingWithMouse.java

Hi Pavel,

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


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,

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 awt-dev mailing list