Cleanup previous PR
This commit is contained in:
parent
b05e939e05
commit
a038477ce0
@ -52,6 +52,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
|||||||
- When a :opt:`tab_bar_background` is specified it should extend to the edges
|
- When a :opt:`tab_bar_background` is specified it should extend to the edges
|
||||||
of the OS window (:iss:`4054`)
|
of the OS window (:iss:`4054`)
|
||||||
|
|
||||||
|
- Linux: Fix IME with fcitx5 not working after fcitx5 is restarted
|
||||||
|
(:pull:`4059`)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
0.23.1 [2021-08-17]
|
0.23.1 [2021-08-17]
|
||||||
|
|||||||
10
glfw/ibus_glfw.c
vendored
10
glfw/ibus_glfw.c
vendored
@ -168,7 +168,7 @@ ibus_on_owner_change(DBusConnection* conn UNUSED, DBusMessage* msg, void* user_d
|
|||||||
}
|
}
|
||||||
|
|
||||||
_GLFWIBUSData* ibus = (_GLFWIBUSData*) user_data;
|
_GLFWIBUSData* ibus = (_GLFWIBUSData*) user_data;
|
||||||
ibus->ok = strcmp(new_owner, "") != 0;
|
ibus->name_owner_changed = true;
|
||||||
|
|
||||||
return DBUS_HANDLER_RESULT_HANDLED;
|
return DBUS_HANDLER_RESULT_HANDLED;
|
||||||
|
|
||||||
@ -317,6 +317,7 @@ glfw_connect_to_ibus(_GLFWIBUSData *ibus) {
|
|||||||
if (ibus->inited) return;
|
if (ibus->inited) return;
|
||||||
if (!test_env_var("GLFW_IM_MODULE", "ibus")) return;
|
if (!test_env_var("GLFW_IM_MODULE", "ibus")) return;
|
||||||
ibus->inited = true;
|
ibus->inited = true;
|
||||||
|
ibus->name_owner_changed = false;
|
||||||
setup_connection(ibus);
|
setup_connection(ibus);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -338,13 +339,12 @@ glfw_ibus_terminate(_GLFWIBUSData *ibus) {
|
|||||||
static bool
|
static bool
|
||||||
check_connection(_GLFWIBUSData *ibus) {
|
check_connection(_GLFWIBUSData *ibus) {
|
||||||
if (!ibus->inited) return false;
|
if (!ibus->inited) return false;
|
||||||
if (ibus->conn && dbus_connection_get_is_connected(ibus->conn) && ibus->ok) {
|
if (ibus->conn && dbus_connection_get_is_connected(ibus->conn) && !ibus->name_owner_changed) return ibus->ok;
|
||||||
return ibus->ok;
|
|
||||||
}
|
|
||||||
struct stat s;
|
struct stat s;
|
||||||
|
ibus->name_owner_changed = false;
|
||||||
if (stat(ibus->address_file_name, &s) != 0 || s.st_mtime != ibus->address_file_mtime) {
|
if (stat(ibus->address_file_name, &s) != 0 || s.st_mtime != ibus->address_file_mtime) {
|
||||||
if (!read_ibus_address(ibus)) return false;
|
if (!read_ibus_address(ibus)) return false;
|
||||||
setup_connection(ibus);
|
return setup_connection(ibus);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
2
glfw/ibus_glfw.h
vendored
2
glfw/ibus_glfw.h
vendored
@ -32,7 +32,7 @@
|
|||||||
#include <xkbcommon/xkbcommon.h>
|
#include <xkbcommon/xkbcommon.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
bool ok, inited;
|
bool ok, inited, name_owner_changed;
|
||||||
time_t address_file_mtime;
|
time_t address_file_mtime;
|
||||||
DBusConnection *conn;
|
DBusConnection *conn;
|
||||||
const char *input_ctx_path, *address_file_name, *address;
|
const char *input_ctx_path, *address_file_name, *address;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user