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

[macos] Click on inactive window fails to activate window

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8, 11, 14, 17, 18, 20
    • client-libs
    • 8
    • os_x

      I've encountered a situation where clicking on an inactive window reliably fails to activate the window. The attempt to activate the window is aborted in CPlatformWindow.deliverWindowFocusEvent because LWCToolkit.isApplicationActive returns true. That method examines the NSRunningApplication active property. The documentation for NSRunningApplication says that its mutable properties are subject to race conditions, so relying on it here seems like a bad idea.
      (The original motivation for this code had something to do with Applets, although the connection is not obvious to me.)

      I have no expectation that the situation that causes the problem for me will have the same effect for anyone else, but for the record, I cause the problem by switching to a Terminal window and running the test test/jdk/java/awt/Dialog/ModalDialogOnNonEdt.java, then clicking on the Java application window.

            honkar Harshitha Onkar
            alans Alan Snyder
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: