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

setAlwaysOnTop doesn't behave correctly in Linux/Solaris under certain scenarios

XMLWordPrintable

    • b114

        The specification says:
        "No window can be brought to be over always-on-top window except maybe another always-on-top window."

        The following procedure breaks this requirement under Linux (tested on Ubuntu 12.04):

        1) create a JDialog, call setAlwaysOnTop(true) for it
        2) create another JDialog and call setAlwaysOnTop(false) for it
        3) call setVisible(true) for the 1st JDialog and then immediately setVisible(true) for the 2nd JDialog

        This results in a second JDialog appearing above the first one which breaks the requirement.

        Toolkit.getDefaultToolkit().isAlwaysOnTopSupported() does return true, so the case is valid.

        If we make a delay between calling setVisible for the dialogs then the issue is not observed.

        On Mac the issue is not observed.

              ssadetsky Semyon Sadetsky (Inactive)
              akulyakh Alexander Kulyakhtin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: