On Wed, 7 May 2025 16:41:37 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.
>> 
>> The test for this pull request is non trivial, as the application needs to 
>> be installed on the Mac before it can be tested. Therefore the test is 
>> provided in a separate repository and it needs to be discussed if the test 
>> is necessary to have inside the JFX repo and if so, how it should be 
>> integrated.
>> 
>> JDK Pull Request: https://github.com/openjdk/jdk/pull/24379
>> Co-Author: @FlorianKirmaier
>> 
>> Link to the test repo: https://github.com/pabulaner/openurifx
>
> 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

The JDK bug https://bugs.openjdk.org/browse/JDK-8332947 says this used to work 
on macOS 13.x but was broken by new requirements on 14.x ... it isn't spelled 
out enough for me to understand. Did it really used to work ?

Also today, FX has nothing that allows an app to  handle these events - ie no 
Desktop class.
if/when it does, then I presume that if ALSO the FX has registered to handle 
these events that in such a case FX would not forward them to FX.

Also if/when FX has a way to handle these events, wouldn't you want AWT to do 
the same .. and pass them on to FX if no AWT handler is registered ?

And its a bit more complicated then than "I'm the hosting toolkit, so I don't 
forward", there needs to be some check for the app having registered a handler.

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

PR Comment: https://git.openjdk.org/jfx/pull/1755#issuecomment-2884954496

Reply via email to