Hi Anthony, thank you for the tip, I'll try to use realSync(), it seems to be the best solution.
Pavel ----- Original Message ----- From: Anthony Petrov <[email protected]> To: Pavel Tisnovsky <[email protected]> Cc: [email protected], [email protected] 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 ((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 >
