Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x11: Overhaul XIM code #451

Merged
merged 2 commits into from
Apr 11, 2018

Conversation

francesca64
Copy link
Member

@francesca64 francesca64 commented Apr 7, 2018

Fixes #195
Fixes #277
Fixes #455

  • Read XMODIFIERS explicitly/directly instead of calling XSetLocaleModifiers with an
    empty string. This is useful for debugging purposes, and more clear to read and handle.
  • Fallback to local input method if the one specified in XMODIFIERS is later closed on the
    server end (i.e. if ibus/fcitx is terminated). Previously, that would cause the event loop
    to freeze and usually also segfault.
  • If using the fallback input method, respond to the XMODIFIERS input method later
    becoming available. This means that the input method restarting is handled, and that even if
    the program was started while ibus/fcitx/etc. was unavailable, it will start using it as
    soon as it becomes available.
  • Only one input method is opened for the whole event loop, with each window having its own
    input context.
  • IME works completely out of the box now, no longer requiring application developers to
    call setlocale or XSetLocaleModifiers.
  • Detailed error messages are provided if no input method could be opened. However, no
    information is provided to the user if their intended XMODIFIERS input method failed to
    open but the fallbacks (which will ostensibly always succeed) succeeded; in my opinion, this
    is something that is best filled by adding a logging feature to winit.

Fixes rust-windowing#195
Fixes rust-windowing#277

* Read `XMODIFIERS` explicitly/directly instead of calling `XSetLocaleModifiers` with an
empty string. This is useful for debugging purposes, and more clear to read and handle.
* Fallback to local input method if the one specified in `XMODIFIERS` is later closed on the
server end (i.e. if ibus/fcitx is terminated). Previously, that would cause the event loop
to freeze and usually also segfault.
* If using the fallback input method, respond to the `XMODIFIERS` input method later
becoming available. This means that the input method restarting is handled, and that even if
the program was started while ibus/fcitx/etc. was unavailable, it will start using it as
soon as it becomes available.
* Only one input method is opened for the whole event loop, with each window having its own
input context.
* IME works completely out of the box now, no longer requiring application developers to
call `setlocale` or `XSetLocaleModifiers`.
* Detailed error messages are provided if no input method could be opened. However, no
information is provided to the user if their intended `XMODIFIERS` input method failed to
open but the fallbacks (which will ostensibly always succeed) succeeded; in my opinion, this
is something that is best filled by adding a logging feature to winit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant