[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#990316: Add GLFW_IM_MODULE=fcitx on ibus and fcitx5 to enable IME in kitty



I played around a bit with kitty on Ubuntu (GNOME/wayland). I built kitty with the attached patch applied, i.e. I removed the line which checks the GLFW_IM_MODULE variable. The modified kitty package is available at <https://launchpad.net/~gunnarhj/+archive/ubuntu/kitty>.

When using that package, I could input in kitty using either ibus or fcitx5 without setting any extra environment variable.

On 2021-06-25 15:23, Yao Wei (魏銘廷) wrote:
However, after some searching I found that the variable looks like
exclusively used in kitty, especially this envvar acts as a toggle
in kitty's source code:

https://github.com/kovidgoyal/kitty/blob/6179cfc6/glfw/ibus_glfw.c#L286

Yes, it's a toggle, and that's apparently its only purpose.

In the light of these observations, I don't think we should let im-config set GLFW_IM_MODULE.

Instead, provided that it's considered a good idea to make kitty ready for ibus or fcitx5 by default, I think that a kitty patch similar to the attached one is a better idea.

--
Best regards,
Gunnar Hjalmarsson
--- a/glfw/ibus_glfw.c
+++ b/glfw/ibus_glfw.c
@@ -284,7 +284,6 @@
 void
 glfw_connect_to_ibus(_GLFWIBUSData *ibus) {
     if (ibus->inited) return;
-    if (!test_env_var("GLFW_IM_MODULE", "ibus")) return;
     ibus->inited = true;
     setup_connection(ibus);
 }



Reply to: