diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-02-13 08:30:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-13 08:30:54 -0500 |
commit | 71cba94e73022d8cef8651055204a4706377ae11 (patch) | |
tree | 8ea1a2b6a0414fd7904824ffac330cd4e1e96ca2 /backend/libinput/backend.c | |
parent | 3497e53516d96ad67b26115e2e06218f68e1114d (diff) | |
parent | c2e147401048aa53aebd52f1851b1da8c91043a3 (diff) |
Merge pull request #627 from emersion/wlr-signal-emit-safe
Remove wlr_backend.events.{output_remove,device_remove}
Diffstat (limited to 'backend/libinput/backend.c')
-rw-r--r-- | backend/libinput/backend.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/backend/libinput/backend.c b/backend/libinput/backend.c index 86477947..71fe0d93 100644 --- a/backend/libinput/backend.c +++ b/backend/libinput/backend.c @@ -1,10 +1,11 @@ -#include <stdlib.h> #include <assert.h> #include <libinput.h> -#include <wlr/backend/session.h> +#include <stdlib.h> #include <wlr/backend/interface.h> +#include <wlr/backend/session.h> #include <wlr/util/log.h> #include "backend/libinput.h" +#include "util/signal.h" static int wlr_libinput_open_restricted(const char *path, int flags, void *_backend) { @@ -106,13 +107,12 @@ 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) { - wl_signal_emit(&backend->backend.events.input_remove, wlr_dev); wlr_input_device_destroy(wlr_dev); } free(wlr_devices); } - wl_signal_emit(&wlr_backend->events.destroy, wlr_backend); + wlr_signal_emit_safe(&wlr_backend->events.destroy, wlr_backend); wl_list_remove(&backend->display_destroy.link); wl_list_remove(&backend->session_signal.link); |