x11: Only access XIM from the event loop thread (#439)

XIM isn't thread-safe at all. Any call made to it from another thread will result in the
event loop freezing (this is why the old implementation of Drop for Window had that
problem).

XIM is now confined to one thread, and the existing API is maintained using channels. In
testing this with Alacritty, I initially thought the occasional slight lag on updating the
spot location was due to this change, but it's present without it as well.
This commit is contained in:
Francesca Frangipane
2018-04-05 14:58:10 -04:00
committed by GitHub
parent 7cd440135a
commit 1c4973d5b7
3 changed files with 162 additions and 115 deletions

View File

@@ -3,6 +3,7 @@
- Added subclass to macos windows so they can be made resizable even with no decorations.
- Dead keys now work properly on X11, no longer resulting in a panic.
- On X11, input method creation first tries to use the value from the user's `XMODIFIERS` environment variable, so application developers should no longer need to manually call `XSetLocaleModifiers`. If that fails, fallbacks are tried, which should prevent input method initialization from ever outright failing.
- Fixed thread safety issues with input methods on X11.
# Version 0.11.3 (2018-03-28)