JDK-8169589 : [macosx] Activating a JDialog puts to back another dialog
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8u112,9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • CPU: x86_64
  • Submitted: 2016-11-10
  • Updated: 2021-11-30
  • Resolved: 2016-12-02
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 JDK 9 Other
8u112Fixed 9 b150Fixed openjdk7uFixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8175952 :  
Description
FULL PRODUCT VERSION :
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b16, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Mac OS X 10.7.5
mac OS 10.12.1

A DESCRIPTION OF THE PROBLEM :
If a Swing application opens two dialogs, activating one dialog puts the other one behind the app frame.

The attached test case also reproduces the problem using 'java.awt', i.e., replacing JFrame by Frame and JDialog by Dialog.

REGRESSION.  Last worked in version 8u102

ADDITIONAL REGRESSION INFORMATION: 
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Executing the attached test case.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Activating each of two dialogs, both dialogs must remain above the app frame.
ACTUAL -
Activating one dialog puts the other one behind the app frame.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
public class Test
{
    public static void main(String args[])
    {
        JFrame frame = new JFrame("FRAME");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setBounds(200, 50, 300, 300);
        frame.setVisible(true);

        JDialog dlg = new JDialog(frame, "DLG 1", false);
        dlg.setBounds(50, 100, 200, 200);
        dlg.setVisible(true);

        JDialog dlg2 = new JDialog(frame, "DLG 2", false);
        dlg2.setBounds(450, 100, 200, 200);
        dlg2.setVisible(true);
    }
}
---------- END SOURCE ----------


Comments
URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/c1e333ed1273 User: lana Date: 2016-12-21 16:40:05 +0000
21-12-2016

Formally this issue is a regression in CPU17_01 (the first time when we have JDK-8080729 in CPU is 8u121 b01). Up to RTeam to decide if we can postpone this fiz for the April CPU. If yes, do we need to add this issue in the release notes for CPU17_01?
12-12-2016

URL: http://hg.openjdk.java.net/jdk9/client/jdk/rev/c1e333ed1273 User: dmarkov Date: 2016-12-02 09:46:36 +0000
02-12-2016

Problem description: Current implementation of CPlatformWindow.orderAboveSiblings() just recursively pops up the windows from ‘active’ parent-child window chain. At the same time other child windows (which are not in active chain) stayed ‘untouched’ and may be placed behind their nearest parent/owner. Possible fix: CPlatformWindow.orderAboveSiblings() should be modified. It has to take into account that a window may own more than one child window.
24-11-2016

However re-assigned to Dmitry as JDK-8080729 regression responsible engineer, since this is a P2 and pending immediate attention to resolve
23-11-2016

Checked this issue against 8u102,8u111,8u112,9ea on MacOS,Windows 7 and could reproduce the issue on MacOS, but could not on Windows 7. Steps to reproduce: ************************* - Run the attached test application(Test111.java) with JDK. Result: ********* OS : macOS Sierra version 10.12.1 JDK: 8u102 b14 : Pass 8u111 b14 : Pass 8u112 b16 : Fail << Introduced Version 9ea+143 : Fail ================================================================================================================
14-11-2016

The issue seems to be a change in Dialog and not in JDialog. Hence looks like an AWT issue. May need analysis from AWT team.
14-11-2016

The issue seems to be a change in Dialog and not in JDialog. Hence looks like an AWT issue. May need analysis from AWT team.
14-11-2016

Affects JDK 8 and 9. Reproducible on Mac OS X 10.10.5 as well.
14-11-2016