Remove wlr_backend.events.{output_remove,device_remove}

This commit is contained in:
emersion 2018-02-12 10:36:43 +01:00
parent 5e58d46cc1
commit 10ecf871f2
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
25 changed files with 263 additions and 382 deletions

View file

@ -107,7 +107,6 @@ static void wlr_libinput_backend_destroy(struct wlr_backend *wlr_backend) {
struct wl_list *wlr_devices = backend->wlr_device_lists.items[i];
struct wlr_input_device *wlr_dev, *next;
wl_list_for_each_safe(wlr_dev, next, wlr_devices, link) {
wlr_signal_emit_safe(&backend->backend.events.input_remove, wlr_dev);
wlr_input_device_destroy(wlr_dev);
}
free(wlr_devices);

View file

@ -89,7 +89,7 @@ static void handle_device_added(struct wlr_libinput_backend *backend,
free(wlr_dev);
goto fail;
}
wlr_signal_emit_safe(&backend->backend.events.input_add, wlr_dev);
wlr_signal_emit_safe(&backend->backend.events.new_input, wlr_dev);
}
if (libinput_device_has_capability(libinput_dev, LIBINPUT_DEVICE_CAP_POINTER)) {
struct wlr_input_device *wlr_dev = allocate_device(backend,
@ -102,7 +102,7 @@ static void handle_device_added(struct wlr_libinput_backend *backend,
free(wlr_dev);
goto fail;
}
wlr_signal_emit_safe(&backend->backend.events.input_add, wlr_dev);
wlr_signal_emit_safe(&backend->backend.events.new_input, wlr_dev);
}
if (libinput_device_has_capability(libinput_dev, LIBINPUT_DEVICE_CAP_TOUCH)) {
struct wlr_input_device *wlr_dev = allocate_device(backend,
@ -115,7 +115,7 @@ static void handle_device_added(struct wlr_libinput_backend *backend,
free(wlr_dev);
goto fail;
}
wlr_signal_emit_safe(&backend->backend.events.input_add, wlr_dev);
wlr_signal_emit_safe(&backend->backend.events.new_input, wlr_dev);
}
if (libinput_device_has_capability(libinput_dev, LIBINPUT_DEVICE_CAP_TABLET_TOOL)) {
struct wlr_input_device *wlr_dev = allocate_device(backend,
@ -128,7 +128,7 @@ static void handle_device_added(struct wlr_libinput_backend *backend,
free(wlr_dev);
goto fail;
}
wlr_signal_emit_safe(&backend->backend.events.input_add, wlr_dev);
wlr_signal_emit_safe(&backend->backend.events.new_input, wlr_dev);
}
if (libinput_device_has_capability(libinput_dev, LIBINPUT_DEVICE_CAP_TABLET_PAD)) {
struct wlr_input_device *wlr_dev = allocate_device(backend,
@ -141,7 +141,7 @@ static void handle_device_added(struct wlr_libinput_backend *backend,
free(wlr_dev);
goto fail;
}
wlr_signal_emit_safe(&backend->backend.events.input_add, wlr_dev);
wlr_signal_emit_safe(&backend->backend.events.new_input, wlr_dev);
}
if (libinput_device_has_capability(libinput_dev, LIBINPUT_DEVICE_CAP_GESTURE)) {
// TODO
@ -179,7 +179,6 @@ static void handle_device_removed(struct wlr_libinput_backend *backend,
}
struct wlr_input_device *dev, *tmp_dev;
wl_list_for_each_safe(dev, tmp_dev, wlr_devices, link) {
wlr_signal_emit_safe(&backend->backend.events.input_remove, dev);
wlr_input_device_destroy(dev);
}
for (size_t i = 0; i < backend->wlr_device_lists.length; i++) {