aboutsummaryrefslogtreecommitdiff
path: root/backend/libinput/events.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-11-20 15:32:47 -0500
committerGitHub <noreply@github.com>2017-11-20 15:32:47 -0500
commit6bde8dd56beebc429445196d7d4a120677289317 (patch)
treef6256c013de96d3acfd4218b1f516249bd63c0d6 /backend/libinput/events.c
parentbecd75fd2ebd31fec9fdcf9cc2f37c5957d31b37 (diff)
parent64221c6da1a8783ba1e614a1c821b585b1e70ab8 (diff)
Merge pull request #431 from emersion/refactor-wlr-list
Refactor wlr_list
Diffstat (limited to 'backend/libinput/events.c')
-rw-r--r--backend/libinput/events.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/backend/libinput/events.c b/backend/libinput/events.c
index 3ca41124..c14aef01 100644
--- a/backend/libinput/events.c
+++ b/backend/libinput/events.c
@@ -147,7 +147,7 @@ static void handle_device_added(struct wlr_libinput_backend *backend,
if (wl_list_length(wlr_devices) > 0) {
libinput_device_set_user_data(libinput_dev, wlr_devices);
- wlr_list_add(backend->wlr_device_lists, wlr_devices);
+ wlr_list_push(&backend->wlr_device_lists, wlr_devices);
} else {
free(wlr_devices);
}
@@ -177,9 +177,9 @@ static void handle_device_removed(struct wlr_libinput_backend *backend,
wl_signal_emit(&backend->backend.events.input_remove, dev);
wlr_input_device_destroy(dev);
}
- for (size_t i = 0; i < backend->wlr_device_lists->length; i++) {
- if (backend->wlr_device_lists->items[i] == wlr_devices) {
- wlr_list_del(backend->wlr_device_lists, i);
+ for (size_t i = 0; i < backend->wlr_device_lists.length; i++) {
+ if (backend->wlr_device_lists.items[i] == wlr_devices) {
+ wlr_list_del(&backend->wlr_device_lists, i);
break;
}
}