mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-26 01:40:12 -05:00
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.
This commit is contained in:
parent
d852178540
commit
96f23b4c64
4 changed files with 21 additions and 14 deletions
4
render.c
4
render.c
|
|
@ -3576,7 +3576,7 @@ frame_callback(void *data, struct wl_callback *wl_callback, uint32_t callback_da
|
|||
grid_render(term);
|
||||
|
||||
tll_foreach(term->wl->seats, it) {
|
||||
if (it->item.kbd_focus == term)
|
||||
if (it->item.ime_focus == term)
|
||||
ime_update_cursor_rect(&it->item);
|
||||
}
|
||||
|
||||
|
|
@ -4058,7 +4058,7 @@ fdm_hook_refresh_pending_terminals(struct fdm *fdm, void *data)
|
|||
grid_render(term);
|
||||
|
||||
tll_foreach(term->wl->seats, it) {
|
||||
if (it->item.kbd_focus == term)
|
||||
if (it->item.ime_focus == term)
|
||||
ime_update_cursor_rect(&it->item);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue