JDK-6993873 : java/awt/Focus/FocusOwnerFrameOnClick/FocusOwnerFrameOnClick.java test indicates ".a frame wasn't focused on click" jdk7 issue on linux
Type:Bug
Component:client-libs
Sub-Component:java.awt
Affected Version:7
Priority:P3
Status:Resolved
Resolution:Fixed
OS:linux
CPU:x86
Submitted:2010-10-21
Updated:2014-10-24
Resolved:2014-07-08
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
Changed noreg-self to noreg-existing since the fix touches the actual problem in dev code and could be tested by the existing regression test.
08-07-2014
It seems that the jdk6 fix for JDK-6886678 has been ported to the jdk7 only partially - for Win platform only: http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/rev/d21c9804c512
I've tried to apply the Linux part of the fix and it solved the problem.
Though the problem is not reproduced in jdk8 despite it still has no the mentioned fix. This needs to be investigated.
In jdk8 the problem has been fixed with the fix for JDK-6981400, but the fix hasn't been backported to jdk7.
The method is almost the same, though has been applied to XBaseWindow.handleButtonPressRelease() instead of XContentWindow.handleButtonPressRelease().
For consistency suggest to apply the fix for JDK-6886678
02-07-2014
Test fails on Ubuntu 13.04 with jdk7u55b32.
10-04-2014
Test fails on OEL 6 and Ubuntu 12.04 with jdk7.
02-04-2014
Test passes on Oracle Linux 6.4 and Ubuntu 12.04 with JDK8 b132
31-03-2014
SUGGESTED FIX
+++ b/test/java/awt/Focus/FocusOwnerFrameOnClick/FocusOwnerFrameOnClick.java
@@ -89,8 +89,8 @@ public class FocusOwnerFrameOnClick exte
public void run() {
Point loc = fButton.getLocationOnScreen();
Dimension dim = fButton.getSize();
-
- robot.mouseMove(loc.x, loc.y + dim.height + 20);
+ robot.mouseMove(loc.x + dim.width/2, loc.y + dim.height/2);
robot.delay(50);
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.delay(50);
28-10-2010
EVALUATION
The test misses the click on the fButton.
See suggested fix.