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

[macosx] modal dialog is shown before it is expected

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: tbd
    • Component/s: client-libs
    • Labels:

      Description

      In Dialog.conditionalShow() there's the following logic:

      if (modal) {
        ...
        modalShow();
      }
      ...
      peer.setVisible(true);

      Then:

      modalShow() -> blockWindows() -> peer.blockWindows() -> LWWindowPeer.setModalBlocked() -> CPlatformWindow.setModalBlocked() -> checkBlockingAndOrder() ->

              CWrapper.NSWindow.orderFrontRegardless(nsWindowPtr);
              CWrapper.NSWindow.makeKeyAndOrderFront(nsWindowPtr);
              CWrapper.NSWindow.makeMainWindow(nsWindowPtr);

      This actually shows the platform window, before peer.setVisible(true) is called.

      This seems unexpected and is a potential source of issues (like 8160570).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ant Anton Tarasov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: