mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 17:52:02 +02:00
GNOME: Workaround for GNOME's text input system going into an infinite loop if cursor position is updated in response to a done event
Fixes #5105
This commit is contained in:
3
kitty/glfw-wrapper.h
generated
3
kitty/glfw-wrapper.h
generated
@@ -954,7 +954,8 @@ typedef enum {
|
||||
typedef enum {
|
||||
GLFW_IME_NONE,
|
||||
GLFW_IME_PREEDIT_CHANGED,
|
||||
GLFW_IME_COMMIT_TEXT
|
||||
GLFW_IME_COMMIT_TEXT,
|
||||
GLFW_IME_WAYLAND_DONE_EVENT,
|
||||
} GLFWIMEState;
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -136,6 +136,12 @@ on_key_input(GLFWkeyevent *ev) {
|
||||
id_type active_window_id = w->id;
|
||||
|
||||
switch(ev->ime_state) {
|
||||
case GLFW_IME_WAYLAND_DONE_EVENT:
|
||||
// If we update IME position here it sends GNOME's text input system into
|
||||
// an infinite loop. See https://github.com/kovidgoyal/kitty/issues/5105
|
||||
screen_draw_overlay_text(screen, NULL);
|
||||
debug("handled wayland IME done event");
|
||||
return;
|
||||
case GLFW_IME_PREEDIT_CHANGED:
|
||||
update_ime_position(w, screen);
|
||||
screen_draw_overlay_text(screen, text);
|
||||
|
||||
Reference in New Issue
Block a user