aboutsummaryrefslogtreecommitdiff
path: root/examples/shared.c
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-08-28 10:29:53 -0400
committerTony Crisci <tony@dubstepdish.com>2017-08-28 10:29:53 -0400
commit5c845f14ed72bcdbd45a2e719223c441846f62ad (patch)
treeac07487864f4886d37bec799b77ee0a43a4fbf0b /examples/shared.c
parentdf0ee7f25ff628360f38d87b8a74daaa2cc742a8 (diff)
handle input device destroy
Diffstat (limited to 'examples/shared.c')
-rw-r--r--examples/shared.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/shared.c b/examples/shared.c
index f9d687e3..0346c96d 100644
--- a/examples/shared.c
+++ b/examples/shared.c
@@ -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);