data = calloc(1, sizeof *data);
if (!data) {
- ds_err("Failed to alloc memory\n");
+ ds_err("Failed to alloc memory");
return;
}
}
static void
-devicemgr_remove_keymap_data(struct wl_list *list, int keycode)
+devicemgr_cleanup_keymap_list(struct wl_list *list)
{
struct ds_tizen_input_devicemgr_keymap_data *data, *tmp;
wl_list_for_each_safe(data, tmp, list, link) {
- if (data->keycode == keycode) {
- wl_list_remove(&data->link);
- free(data);
- }
+ wl_list_remove(&data->link);
+ free(data->name);
+ free(data);
}
}
if (!res)
ds_inf("Failed to set keymap");
- devicemgr_remove_keymap_data(&keymap_list, 455);
- devicemgr_remove_keymap_data(&keymap_list, 456);
- devicemgr_remove_keymap_data(&keymap_list, 457);
- devicemgr_remove_keymap_data(&keymap_list, 458);
+ devicemgr_cleanup_keymap_list(&keymap_list);
}
static void
server->devicemgr = ds_tizen_input_devicemgr_create(
server->input_backend, server->seat);
if (!server->devicemgr) {
+ ds_err("Could not create ds_tizen_input_devicemgr");
goto err;
}