keyboard: rename keymap_len to keymap_size

pull/32/head
Greg V 2020-04-09 15:39:09 +03:00
parent fa49aca45a
commit 3f62295214
1 changed files with 5 additions and 5 deletions

View File

@ -170,15 +170,15 @@ int keyboard_init(struct keyboard* self, const char* layout)
if (!keymap_string)
goto keymap_string_failure;
size_t keymap_len = strlen(keymap_string) + 1;
size_t keymap_size = strlen(keymap_string) + 1;
int keymap_fd = shm_alloc_fd(keymap_len);
int keymap_fd = shm_alloc_fd(keymap_size);
if (keymap_fd < 0)
goto fd_failure;
int written = 0;
while (written < keymap_len) {
ssize_t ret = write(keymap_fd, keymap_string + written, keymap_len - written);
while (written < keymap_size) {
ssize_t ret = write(keymap_fd, keymap_string + written, keymap_size - written);
if (ret == -1 && errno == EINTR)
continue;
if (ret == -1)
@ -190,7 +190,7 @@ int keyboard_init(struct keyboard* self, const char* layout)
zwp_virtual_keyboard_v1_keymap(self->virtual_keyboard,
WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,
keymap_fd, keymap_len);
keymap_fd, keymap_size);
close(keymap_fd);