From c996f1d8bdb6b8d77d18d40b401861a07d340817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 11 Sep 2014 23:35:58 +0200 Subject: libinput-device: Don't get initial key states MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Initial key state is no pressed keys, and the libinput_device_get_keys function was deprecated in libinput 0.6.0. Signed-off-by: Jonas Ã…dahl --- src/libinput-device.c | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/libinput-device.c b/src/libinput-device.c index 76438995..0e3f46de 100644 --- a/src/libinput-device.c +++ b/src/libinput-device.c @@ -468,42 +468,12 @@ void evdev_notify_keyboard_focus(struct weston_seat *seat, struct wl_list *evdev_devices) { - struct evdev_device *device; struct wl_array keys; - unsigned int i, set; - char evdev_keys[(KEY_CNT + 7) / 8]; - char all_keys[(KEY_CNT + 7) / 8]; - uint32_t *k; - int ret; if (!seat->keyboard_device_count > 0) return; - memset(all_keys, 0, sizeof all_keys); - wl_list_for_each(device, evdev_devices, link) { - memset(evdev_keys, 0, sizeof evdev_keys); - ret = libinput_device_get_keys(device->device, - evdev_keys, - sizeof evdev_keys); - if (ret < 0) { - weston_log("failed to get keys for device %s\n", - device->devnode); - continue; - } - for (i = 0; i < ARRAY_LENGTH(evdev_keys); i++) - all_keys[i] |= evdev_keys[i]; - } - wl_array_init(&keys); - for (i = 0; i < KEY_CNT; i++) { - set = all_keys[i >> 3] & (1 << (i & 7)); - if (set) { - k = wl_array_add(&keys, sizeof *k); - *k = i; - } - } - notify_keyboard_focus_in(seat, &keys, STATE_UPDATE_AUTOMATIC); - wl_array_release(&keys); } -- cgit v1.2.1