aboutsummaryrefslogtreecommitdiff
path: root/wayland.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-06-15 16:41:08 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-06-15 17:25:33 +0000
commit96f23b4c6436d314ae4272f5f99c51b8e33556eb (patch)
tree60114f4650f1e908a4c2d06f79257baab3f83e75 /wayland.h
parentime: ime_reset_pending_{preedit,commit} is not used outside ime.c (diff)
ime: track IME focus independently from keyboard focus
Replace the seat->ime.focused boolean with a terminal instace pointer, seat->ime_focus. Set and reset this on ime::enter() and ime::leave() events, and use this instead of seat->kbd_focus on all other IME events. This fixes two issues: a) buggy compositors that sometimes sends an IME enter event without first having sent a keyboard enter event. b) seats may be IME capable while still lacking the keyboard capability. Such seats will *always* see IME enter events without a corresponding keyboard enter event.
Diffstat (limited to 'wayland.h')
-rw-r--r--wayland.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/wayland.h b/wayland.h
index daa3e65d..729a225b 100644
--- a/wayland.h
+++ b/wayland.h
@@ -81,6 +81,7 @@ struct seat {
/* Focused terminals */
struct terminal *kbd_focus;
struct terminal *mouse_focus;
+ struct terminal *ime_focus;
/* Keyboard state */
struct wl_keyboard *wl_keyboard;
@@ -202,7 +203,6 @@ struct seat {
} pending;
} surrounding;
- bool focused;
uint32_t serial;
} ime;
#endif