diff options
author | Kirill Primak <vyivel@eclair.cafe> | 2023-05-18 08:39:24 +0300 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2023-05-18 08:39:24 +0300 |
commit | 75293d5fb02f7a968a8409741553d958f015458a (patch) | |
tree | 558048372e86f532c025b3477fdb9c240d4ba718 | |
parent | e2647c5151f28598465c7d6391ccdbc86ff39859 (diff) |
keyboard: use the new data in wlr_keyboard_set_keymap()
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3647
-rw-r--r-- | types/wlr_keyboard.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/types/wlr_keyboard.c b/types/wlr_keyboard.c index 5c143f45..81181704 100644 --- a/types/wlr_keyboard.c +++ b/types/wlr_keyboard.c @@ -189,18 +189,18 @@ bool wlr_keyboard_set_keymap(struct wlr_keyboard *kb, struct xkb_keymap *keymap) return true; } - struct xkb_state *xkb_state = xkb_state_new(kb->keymap); + struct xkb_state *xkb_state = xkb_state_new(keymap); if (xkb_state == NULL) { wlr_log(WLR_ERROR, "Failed to create XKB state"); return false; } - char *keymap_str = xkb_keymap_get_as_string(kb->keymap, XKB_KEYMAP_FORMAT_TEXT_V1); + char *keymap_str = xkb_keymap_get_as_string(keymap, XKB_KEYMAP_FORMAT_TEXT_V1); if (keymap_str == NULL) { wlr_log(WLR_ERROR, "Failed to get string version of keymap"); goto error_xkb_state; } - size_t keymap_size = strlen(kb->keymap_string) + 1; + size_t keymap_size = strlen(keymap_str) + 1; int rw_fd = -1, ro_fd = -1; if (!allocate_shm_file_pair(keymap_size, &rw_fd, &ro_fd)) { |