IME: rename pressed_keys to forwarded_pressed_keys

This commit is contained in:
tokyo4j 2025-01-06 16:28:37 +09:00 committed by Johan Malm
parent 6f1ef10d58
commit 405e543faf
2 changed files with 3 additions and 3 deletions

View file

@ -21,7 +21,7 @@ struct input_method_relay {
struct wl_list text_inputs; /* struct text_input.link */ struct wl_list text_inputs; /* struct text_input.link */
struct wlr_input_method_v2 *input_method; struct wlr_input_method_v2 *input_method;
struct wlr_surface *focused_surface; struct wlr_surface *focused_surface;
struct lab_set pressed_keys; struct lab_set forwarded_pressed_keys;
/* /*
* Text-input which is enabled by the client and communicating with * Text-input which is enabled by the client and communicating with
* input-method. * input-method.

View file

@ -78,7 +78,7 @@ input_method_keyboard_grab_forward_key(struct keyboard *keyboard,
* key-press events forwarded * key-press events forwarded
*/ */
struct lab_set *pressed_keys = struct lab_set *pressed_keys =
&keyboard->base.seat->input_method_relay->pressed_keys; &keyboard->base.seat->input_method_relay->forwarded_pressed_keys;
if (event->state == WL_KEYBOARD_KEY_STATE_RELEASED if (event->state == WL_KEYBOARD_KEY_STATE_RELEASED
&& !lab_set_contains(pressed_keys, event->keycode)) { && !lab_set_contains(pressed_keys, event->keycode)) {
return false; return false;
@ -345,7 +345,7 @@ handle_input_method_grab_keyboard(struct wl_listener *listener, void *data)
keyboard_grab, active_keyboard); keyboard_grab, active_keyboard);
} }
relay->pressed_keys = (struct lab_set){0}; relay->forwarded_pressed_keys = (struct lab_set){0};
relay->keyboard_grab_destroy.notify = handle_keyboard_grab_destroy; relay->keyboard_grab_destroy.notify = handle_keyboard_grab_destroy;
wl_signal_add(&keyboard_grab->events.destroy, wl_signal_add(&keyboard_grab->events.destroy,