mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-23 06:59:44 -05:00
Fix keyboard handling in examples
This commit is contained in:
parent
6241ac41d5
commit
aa8a4f12b7
3 changed files with 8 additions and 42 deletions
|
|
@ -59,9 +59,8 @@ void keyboard_add(struct wlr_input_device *device, struct roots_input *input) {
|
|||
rules.options = getenv("XKB_DEFAULT_OPTIONS");
|
||||
struct xkb_context *context;
|
||||
assert(context = xkb_context_new(XKB_CONTEXT_NO_FLAGS));
|
||||
wlr_keyboard_set_keymap(device->keyboard,
|
||||
xkb_map_new_from_names(context, &rules,
|
||||
XKB_KEYMAP_COMPILE_NO_FLAGS));
|
||||
wlr_keyboard_set_keymap(device->keyboard, xkb_map_new_from_names(context,
|
||||
&rules, XKB_KEYMAP_COMPILE_NO_FLAGS));
|
||||
xkb_context_unref(context);
|
||||
wlr_seat_attach_keyboard(input->wl_seat, device);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue