Linux: Turn off IME unless the GLFW_IM_MODULE=ibus env var is set

This commit is contained in:
Kovid Goyal 2018-09-07 16:07:01 +05:30
parent d2b900c77f
commit 0fa12a687d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 2 deletions

View File

@ -13,6 +13,10 @@ Changelog
font fallback for all subsequent characters that cannot be rendered in the
main font to fail (:iss:`799`)
- Linux: Do not enable IME input via ibus unless the ``GLFW_IM_MODULE=ibus``
environment variable is set. IME causes key processing latency and even
missed keystrokes for many people, so it is now off by default.
- Fix backspacing of wide characters in wide-character unaware programs not working (:iss:`875`)
- Linux: Fix number pad arrow keys not working when Numlock is off (:iss:`857`)

3
glfw/ibus_glfw.c vendored
View File

@ -280,8 +280,7 @@ setup_connection(_GLFWIBUSData *ibus) {
void
glfw_connect_to_ibus(_GLFWIBUSData *ibus) {
if (ibus->inited) return;
if (!test_env_var("XMODIFIERS", "@im=ibus") && !test_env_var("GTK_IM_MODULE", "ibus") && !test_env_var("QT_IM_MODULE", "ibus") && !test_env_var("GLFW_IM_MODULE", "ibus")) return;
if (getenv("GLFW_IM_MODULE") && !test_env_var("GLFW_IM_MODULE", "ibus")) return;
if (!test_env_var("GLFW_IM_MODULE", "ibus")) return;
ibus->inited = GLFW_TRUE;
setup_connection(ibus);
}