|
|
@ -239,15 +239,21 @@ void new_input_notify(struct wl_listener *listener, void *data) {
|
|
|
|
wlr_log(WLR_ERROR, "Failed to create XKB context");
|
|
|
|
wlr_log(WLR_ERROR, "Failed to create XKB context");
|
|
|
|
exit(1);
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
wlr_keyboard_set_keymap(device->keyboard, xkb_map_new_from_names(context,
|
|
|
|
struct xkb_keymap *keymap = xkb_map_new_from_names(context, &rules,
|
|
|
|
&rules, XKB_KEYMAP_COMPILE_NO_FLAGS));
|
|
|
|
XKB_KEYMAP_COMPILE_NO_FLAGS);
|
|
|
|
|
|
|
|
if (!keymap) {
|
|
|
|
|
|
|
|
wlr_log(WLR_ERROR, "Failed to create XKB keymap");
|
|
|
|
|
|
|
|
exit(1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
wlr_keyboard_set_keymap(device->keyboard, keymap);
|
|
|
|
|
|
|
|
xkb_keymap_unref(keymap);
|
|
|
|
xkb_context_unref(context);
|
|
|
|
xkb_context_unref(context);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case WLR_INPUT_DEVICE_POINTER:;
|
|
|
|
case WLR_INPUT_DEVICE_POINTER:;
|
|
|
|
struct sample_cursor *cursor = calloc(1, sizeof(struct sample_cursor));
|
|
|
|
struct sample_cursor *cursor = calloc(1, sizeof(struct sample_cursor));
|
|
|
|
struct sample_pointer *pointer = calloc(1, sizeof(struct sample_pointer));
|
|
|
|
struct sample_pointer *pointer = calloc(1, sizeof(struct sample_pointer));
|
|
|
|
pointer->device = device;
|
|
|
|
pointer->device = device;
|
|
|
|
cursor->sample = sample;
|
|
|
|
cursor->sample = sample;
|
|
|
|
cursor->device = device;
|
|
|
|
cursor->device = device;
|
|
|
|
|
|
|
|
|
|
|
|
cursor->cursor = wlr_cursor_create();
|
|
|
|
cursor->cursor = wlr_cursor_create();
|
|
|
@ -324,6 +330,11 @@ int main(int argc, char *argv[]) {
|
|
|
|
cursor_destroy(cursor);
|
|
|
|
cursor_destroy(cursor);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct sample_pointer *pointer, *tmp_pointer;
|
|
|
|
|
|
|
|
wl_list_for_each_safe(pointer, tmp_pointer, &state.pointers, link) {
|
|
|
|
|
|
|
|
free(pointer);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wlr_xcursor_theme_destroy(theme);
|
|
|
|
wlr_xcursor_theme_destroy(theme);
|
|
|
|
wlr_output_layout_destroy(state.layout);
|
|
|
|
wlr_output_layout_destroy(state.layout);
|
|
|
|
}
|
|
|
|
}
|
|
|
|