virtual_keyboard: Accept keycode 0

This commit is contained in:
Dorota Czaplejewicz 2019-11-27 15:09:16 +00:00 committed by Simon Ser
parent 5df606d8ab
commit fadd4706ed
2 changed files with 0 additions and 4 deletions

View file

@ -75,9 +75,6 @@ context_fail:
static void virtual_keyboard_key(struct wl_client *client, static void virtual_keyboard_key(struct wl_client *client,
struct wl_resource *resource, uint32_t time, uint32_t key, struct wl_resource *resource, uint32_t time, uint32_t key,
uint32_t state) { uint32_t state) {
if (key == 0) {
return;
}
struct wlr_virtual_keyboard_v1 *keyboard = struct wlr_virtual_keyboard_v1 *keyboard =
virtual_keyboard_from_resource(resource); virtual_keyboard_from_resource(resource);
if (!keyboard->has_keymap) { if (!keyboard->has_keymap) {

View file

@ -24,7 +24,6 @@ bool set_add(uint32_t values[], size_t *len, size_t cap, uint32_t target) {
if (*len == cap) { if (*len == cap) {
return false; return false;
} }
assert(target > 0);
for (uint32_t i = 0; i < *len; ++i) { for (uint32_t i = 0; i < *len; ++i) {
if (values[i] == target) { if (values[i] == target) {
return false; return false;