RFR: 8322784: JFXPanel calls InputMethodRequests on wrong thread [v3]
Martin Fox
mfox at openjdk.org
Tue Jan 23 17:24:05 UTC 2024
> On Windows we need to ensure InputMethodRequests coming from JFXPanel are processed on the JavaFX application thread instead of the AWT EventQueue thread. This PR adds the runAndWait() calls to do that.
>
> This would be difficult to test on Windows without a fix for [JDK-8090267](https://bugs.openjdk.org/browse/JDK-8090267) so I've included the fix first proposed by @prsadhuk in PR #1169. If a developer uses the sample code provided in the JavaDoc to create and show a JFXPanel there's a good chance the JFXPanel will get focus before the scene has been set. To ensure AWT always treats the JFXPanel as an active IME client we return a stub version of the InputMethodRequests object if there's no scene. AWT will continue to ask for the InputMethodRequests and once the scene has been set the panel will return a non-stub version.
Martin Fox has updated the pull request incrementally with one additional commit since the last revision:
Switch to using AtomicReference/AtomicInteger
-------------
Changes:
- all: https://git.openjdk.org/jfx/pull/1337/files
- new: https://git.openjdk.org/jfx/pull/1337/files/17609f6c..4154ae3e
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jfx&pr=1337&range=02
- incr: https://webrevs.openjdk.org/?repo=jfx&pr=1337&range=01-02
Stats: 24 lines in 1 file changed: 4 ins; 0 del; 20 mod
Patch: https://git.openjdk.org/jfx/pull/1337.diff
Fetch: git fetch https://git.openjdk.org/jfx.git pull/1337/head:pull/1337
PR: https://git.openjdk.org/jfx/pull/1337
More information about the openjfx-dev
mailing list