On Tue, 29 Apr 2025 22:43:03 GMT, Pabulaner IV <d...@openjdk.org> wrote:
>> When trying to register an open URI handler when using JavaFX with a native >> menu, this task fails on Mac. >> Either the native menu is not shown or the URIs are not received. >> >> This pull request fixes this issue if AWT is registered after JavaFX, so >> that AWT runs embedded inside JavaFX. >> It fixes this by introducing a native event to AWT, which can be used by >> JavaFX to forward events such as an openURL event. >> >> JavaFX Pull Request: https://github.com/openjdk/jfx/pull/1755 >> Co-Author: @FlorianKirmaier > > Pabulaner IV has updated the pull request incrementally with three additional > commits since the last revision: > > - 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events > - 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events > - 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events Answer to question 2: I found the issue and moved the registration of the embedded event handler up. This way the embedded events can be received, even if AWT runs embedded. This would be the output for the after mode: 2025-04-30 00:34:18.757 OpenUriFxApp[68480:1192435] sharedDelegate 2025-04-30 00:34:18.757 OpenUriFxApp[68480:1192435] ApplicationDelegate::sharedDelegate: shouldInstall=0, isApplicationOwner=0, overrideDelegate=0 Apr 30, 2025 12:34:19 AM de.pabulaner.openurifx.OpenUriFxApp log INFO: Menu: true 2025-04-30 00:34:19.587 OpenUriFxApp[68480:1192435] sharedDelegate 2025-04-30 00:34:19.654 OpenUriFxApp[68480:1192435] +[IMKClient subclass]: chose IMKClient_Modern 2025-04-30 00:34:19.654 OpenUriFxApp[68480:1192435] +[IMKInputSession subclass]: chose IMKInputSession_Modern 2025-04-30 00:34:23.862 OpenUriFxApp[68480:1192435] AWT: ApplicationDelegate::_embeddedEvent 2025-04-30 00:34:23.862 OpenUriFxApp[68480:1192435] AWT: ApplicationDelegate::_openURL: openurifx://hello Apr 30, 2025 12:34:23 AM de.pabulaner.openurifx.OpenUriFxApp log ------------- PR Comment: https://git.openjdk.org/jdk/pull/24379#issuecomment-2840397615 PR Comment: https://git.openjdk.org/jdk/pull/24379#issuecomment-2840399384