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.
(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.
- relates to
-
JDK-7150349 [macosx] Applets attempting to show popup menus activate the applet process
-
- Closed
-