On Sat, 18 Jul 2026 19:07:04 GMT, Kevin Rushforth <[email protected]> wrote:
>> Thinking out loud... another alternative would be for JavaFX to initialize >> AWT via a call to `Toolkit.getToolkit()` when we receive this event. That >> would mean the fix could be done entirely in JavaFX and you might not need >> to worry about queuing the messages, presuming the call could be done >> synchronously. This would need discussion and a CSR. ... > So I actually implemented Your feedback and the new implementation just > requires a change on the JFX side. It uses a method invocation in the native > part of the code to just call Toolkit.getDefaultToolkit() and therefore > initializes AWT when receiving url events. I see that you did a proof of concept of my alternative thought. Presuming that receiving the `NSApplicationDelegate application:openURLs:` event means that it is reasonable for the AWT toolkit to be initialized, something like this might work. I do like this better than the alternative of needing coordinated changes on the AWT side. Have you tested it in various scenarios to ensure that there are no problems initializing the toolkit from the AppKit thread? You will also need to test what happens when the AWT Toolkit is already initialized (although I can't think of any potential problems). As I mentioned above, this will need some discussion on the mailing list and it will need a CSR, since it is a behavioral change. ------------- PR Comment: https://git.openjdk.org/jfx/pull/2203#issuecomment-5318427132
