RFR: 8332947: [macos] OpenURIHandler events not received when AWT is embedded in another toolkit [v7]

Harshitha Onkar honkar at openjdk.org
Thu May 15 16:23:55 UTC 2025


On Wed, 7 May 2025 16:51:30 GMT, Pabulaner IV <duke at 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 one additional commit since the last revision:
> 
>   8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events

LGTM apart from minor inline comments

src/java.desktop/macosx/native/libawt_lwawt/awt/ApplicationDelegate.m line 494:

> 492: }
> 493: 
> 494: + (void)_embeddedEvent:(NSNotification *)notification {

@kevinrushforth @prrace 

Is '_embeddedEvent' too generic, does it need to be changed to something more inline with OpenURI e.g '_openURIEvent' ?

-------------

Marked as reviewed by honkar (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24379#pullrequestreview-2844335685
PR Review Comment: https://git.openjdk.org/jdk/pull/24379#discussion_r2091559784


More information about the client-libs-dev mailing list