Clean backport of 8221261: Deadlock on macOS in JFXPanel app when handling IME calls
------------- Commit messages: - 8221261: Deadlock on macOS in JFXPanel app when handling IME calls Changes: https://git.openjdk.org/jfx17u/pull/178/files Webrev: https://webrevs.openjdk.org/?repo=jfx17u&pr=178&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8221261 Stats: 30 lines in 1 file changed: 28 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jfx17u/pull/178.diff Fetch: git fetch https://git.openjdk.org/jfx17u.git pull/178/head:pull/178 PR: https://git.openjdk.org/jfx17u/pull/178