From 8280899ce1ea0339de0ca68963f77ddd5dbd11c3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 10 Nov 2022 07:21:34 +0530 Subject: [PATCH] IBUS: When creating the connection mark as focused if any top level window has focus. Fixes #5655 --- glfw/ibus_glfw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glfw/ibus_glfw.c b/glfw/ibus_glfw.c index 17a2ca19f..9342508db 100644 --- a/glfw/ibus_glfw.c +++ b/glfw/ibus_glfw.c @@ -383,7 +383,7 @@ input_context_created(DBusMessage *msg, const char* errmsg, void *data) { enum Capabilities caps = IBUS_CAP_FOCUS | IBUS_CAP_PREEDIT_TEXT; if (!glfw_dbus_call_method_no_reply(ibus->conn, IBUS_SERVICE, ibus->input_ctx_path, IBUS_INPUT_INTERFACE, "SetCapabilities", DBUS_TYPE_UINT32, &caps, DBUS_TYPE_INVALID)) return; ibus->ok = true; - glfw_ibus_set_focused(ibus, false); + glfw_ibus_set_focused(ibus, _glfwFocusedWindow() != NULL); glfw_ibus_set_cursor_geometry(ibus, 0, 0, 0, 0); debug("Connected to IBUS daemon for IME input management\n"); }