JDK-7081594 : Windows owned by an always-on-top window DO NOT automatically become always-on-top
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-08-21
  • Updated: 2014-11-10
  • Resolved: 2013-10-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.

To download the current JDK release, click here.
JDK 8
8 b112Fixed
Related Reports
Relates :  
Description
Windows owned by an always-on-top window DO NOT automatically become always-on-top.

From the spec for java.awt.Window.setAlwaysOnTop(boolean):

"All windows owned by an always-on-top window inherit this state and automatically become always-on-top."

The following testcases fail due to this issue:
api/java_awt/Window/indexTGF.html#AlwaysOnTop[ownedAlwaysOnTop]
api/java_awt/Window/indexTGF.html#AlwaysOnTop[masterCeasesAlwaysOnTop]

Comments
Verified in jdk8b114 Windows 7 Pro x64 Tests api/java_awt/Window/indexTGF.html#AlwaysOnTop[ownedAlwaysOnTop] api/java_awt/Window/indexTGF.html#AlwaysOnTop[masterCeasesAlwaysOnTop] passed successful Test test/java/awt/Window/AlwaysOnTop/AlwaysOnTopFieldTest.java passed successful
08-11-2013

Alexandr, please include it to the jdk8 scope of fixes
27-09-2013

Seems like this is simply not implemented.
26-08-2013

EVALUATION The problem is reproducible. Should be investigated.
30-08-2011

EVALUATION We have no JCK8 builds just yet, so information about test suite cannot be provided. Please, see mini-test attached import java.awt.*; public class AlwaysOnTopTest { public static void main(String[] args) { test1(); test2(); } private static void test1() { Window frame = new Frame("Frame"); frame.setSize(200, 200); frame.setAlwaysOnTop(true); frame.setVisible(true); waitAWhile(); Window dialog = new Dialog(frame, "owned"); dialog.setSize(200, 200); dialog.setLocation(100, 100); dialog.setVisible(true); waitAWhile(); System.out.println(String.format( "frame.isAlwaysOnTop() = %s; dialog.isAlwaysOnTop() = %s", frame.isAlwaysOnTop(), dialog.isAlwaysOnTop() )); frame.dispose(); dialog.dispose(); waitAWhile(); } private static void test2() { Window frame = new Frame("Frame"); frame.setSize(200, 200); frame.setVisible(true); waitAWhile(); Window dialog = new Dialog(frame, "owned"); dialog.setSize(200, 200); dialog.setLocation(100, 100); dialog.setVisible(true); frame.setAlwaysOnTop(true); waitAWhile(); System.out.println(String.format( "frame.isAlwaysOnTop() = %s; dialog.isAlwaysOnTop() = %s", frame.isAlwaysOnTop(), dialog.isAlwaysOnTop() )); frame.dispose(); dialog.dispose(); waitAWhile(); } private static void waitAWhile() { try { Thread.sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); } } } Expected output: frame.isAlwaysOnTop() = true; dialog.isAlwaysOnTop() = true frame.isAlwaysOnTop() = true; dialog.isAlwaysOnTop() = true Actual output: frame.isAlwaysOnTop() = true; dialog.isAlwaysOnTop() = false frame.isAlwaysOnTop() = true; dialog.isAlwaysOnTop() = false
26-08-2011

EVALUATION Please provide more information. Where test suit could be found. Where sources of the test could be found. Please describe expected behavior versus actual behavior.
24-08-2011