diff options
author | Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> | 2018-08-22 12:46:25 +0200 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-08-22 14:43:29 +0100 |
commit | 2929f0f8ddd50b19fd9234e73d4aac6f83704bfb (patch) | |
tree | d1074729741509e7fb4630afa70ddc80fa6a1791 | |
parent | d7c027d3e3d6b96c21bfd379a0e8542e77607e69 (diff) |
wlr_input_device: fix keyboard destruction
After destroying a keyboard input device, seat's listeners could still be pointing to destroyed wlr_input_device signals. This patch makes sure the references are removed while the input device is being destroyed.
-rw-r--r-- | types/seat/wlr_seat_keyboard.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/types/seat/wlr_seat_keyboard.c b/types/seat/wlr_seat_keyboard.c index 8c1b56e1..e8ea300e 100644 --- a/types/seat/wlr_seat_keyboard.c +++ b/types/seat/wlr_seat_keyboard.c @@ -110,7 +110,7 @@ static void handle_keyboard_repeat_info(struct wl_listener *listener, static void handle_keyboard_destroy(struct wl_listener *listener, void *data) { struct wlr_seat_keyboard_state *state = wl_container_of(listener, state, keyboard_destroy); - state->keyboard = NULL; + wlr_seat_set_keyboard(state->seat, NULL); } void wlr_seat_set_keyboard(struct wlr_seat *seat, |