Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8169589

[macosx] Activating a JDialog puts to back another dialog

    Details

    • Subcomponent:
    • Introduced In Version:
    • Resolved In Build:
      b150
    • CPU:
      x86_64
    • OS:
      os_x

      Backports

        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 ----------

          Issue Links

            Activity

            Hide
            aroy Abhijit Roy added a comment - - edited
            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
            ================================================================================================================
            Show
            aroy Abhijit Roy added a comment - - edited 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 ================================================================================================================
            Hide
            aniyogi Avik Niyogi added a comment -
            Affects JDK 8 and 9. Reproducible on Mac OS X 10.10.5 as well.
            Show
            aniyogi Avik Niyogi added a comment - Affects JDK 8 and 9. Reproducible on Mac OS X 10.10.5 as well.
            Hide
            aniyogi Avik Niyogi added a comment -
            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.
            Show
            aniyogi Avik Niyogi added a comment - 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.
            Hide
            aniyogi Avik Niyogi added a comment -
            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.
            Show
            aniyogi Avik Niyogi added a comment - 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.
            Hide
            vdyakov Victor Dyakov added a comment - - edited
            However re-assigned to Dmitry as JDK-8080729 regression responsible engineer, since this is a P2 and pending immediate attention to resolve
            Show
            vdyakov Victor Dyakov added a comment - - edited However re-assigned to Dmitry as JDK-8080729 regression responsible engineer, since this is a P2 and pending immediate attention to resolve
            Hide
            dmarkov Dmitry Markov added a comment -
            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.
            Show
            dmarkov Dmitry Markov added a comment - 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.
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/client/jdk/rev/c1e333ed1273
            User: dmarkov
            Date: 2016-12-02 09:46:36 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/client/jdk/rev/c1e333ed1273 User: dmarkov Date: 2016-12-02 09:46:36 +0000
            Hide
            afomin Alexander Fomin (Inactive) added a comment -
            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?
            Show
            afomin Alexander Fomin (Inactive) added a comment - 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?
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/c1e333ed1273
            User: lana
            Date: 2016-12-21 16:40:05 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/c1e333ed1273 User: lana Date: 2016-12-21 16:40:05 +0000

              People

              • Assignee:
                dmarkov Dmitry Markov
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: