handle input device destroy

This commit is contained in:
Tony Crisci 2017-08-28 10:29:53 -04:00
parent df0ee7f25f
commit 5c845f14ed
6 changed files with 39 additions and 2 deletions

View file

@ -401,6 +401,11 @@ static void tablet_pad_remove(struct wlr_input_device *device, struct compositor
static void input_remove_notify(struct wl_listener *listener, void *data) {
struct wlr_input_device *device = data;
struct compositor_state *state = wl_container_of(listener, state, input_remove);
if (state->input_remove_cb) {
state->input_remove_cb(state, device);
}
switch (device->type) {
case WLR_INPUT_DEVICE_KEYBOARD:
keyboard_remove(device, state);