diff options
author | Alexander Gramiak <agrambot@gmail.com> | 2022-03-03 23:44:53 -0600 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-03-04 08:37:07 +0100 |
commit | d6f279902a094230633cde05f9677da67289dd28 (patch) | |
tree | 2e8b60ad8dd158aad980fbb58db0e9460fd81024 | |
parent | swaynag: die on all allocation failures (diff) | |
download | sway-d6f279902a094230633cde05f9677da67289dd28.tar.gz sway-d6f279902a094230633cde05f9677da67289dd28.tar.zst sway-d6f279902a094230633cde05f9677da67289dd28.zip |
sway/input: don't pass possibly invalid modifiers pointer
active_keyboard may be NULL, in which case an invalid pointer could be
passed to wlr_input_method_keyboard_grab_v2_send_modifiers. This
procedure call is unnecessary since wlroots commit 372a52ec "input
method: send modifiers in set_keyboard", so the call can simply be
removed.
Fixes #6836.
-rw-r--r-- | sway/input/text_input.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sway/input/text_input.c b/sway/input/text_input.c index b8c19c17..58911c2d 100644 --- a/sway/input/text_input.c +++ b/sway/input/text_input.c | |||
@@ -77,8 +77,6 @@ static void handle_im_grab_keyboard(struct wl_listener *listener, void *data) { | |||
77 | struct wlr_keyboard *active_keyboard = wlr_seat_get_keyboard(relay->seat->wlr_seat); | 77 | struct wlr_keyboard *active_keyboard = wlr_seat_get_keyboard(relay->seat->wlr_seat); |
78 | wlr_input_method_keyboard_grab_v2_set_keyboard(keyboard_grab, | 78 | wlr_input_method_keyboard_grab_v2_set_keyboard(keyboard_grab, |
79 | active_keyboard); | 79 | active_keyboard); |
80 | wlr_input_method_keyboard_grab_v2_send_modifiers(keyboard_grab, | ||
81 | &active_keyboard->modifiers); | ||
82 | 80 | ||
83 | wl_signal_add(&keyboard_grab->events.destroy, | 81 | wl_signal_add(&keyboard_grab->events.destroy, |
84 | &relay->input_method_keyboard_grab_destroy); | 82 | &relay->input_method_keyboard_grab_destroy); |