From 61e451ea1b36435341d02ae34548bd0ea3abdd57 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 24 Sep 2017 14:12:56 -0400 Subject: Move keyboard logic to wlr_{keyboard,seat} --- backend/libinput/keyboard.c | 2 +- backend/wayland/wl_seat.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'backend') diff --git a/backend/libinput/keyboard.c b/backend/libinput/keyboard.c index 1c52a6b8..2a626148 100644 --- a/backend/libinput/keyboard.c +++ b/backend/libinput/keyboard.c @@ -68,5 +68,5 @@ void handle_keyboard_key(struct libinput_event *event, wlr_event.state = WLR_KEY_PRESSED; break; } - wl_signal_emit(&wlr_dev->keyboard->events.key, &wlr_event); + wlr_keyboard_update_state(wlr_dev->keyboard, &wlr_event); } diff --git a/backend/wayland/wl_seat.c b/backend/wayland/wl_seat.c index 3e6982a0..ba3feb8d 100644 --- a/backend/wayland/wl_seat.c +++ b/backend/wayland/wl_seat.c @@ -128,17 +128,15 @@ static const struct wl_pointer_listener pointer_listener = { static void keyboard_handle_keymap(void *data, struct wl_keyboard *wl_keyboard, uint32_t format, int32_t fd, uint32_t size) { - + // TODO: set keymap } static void keyboard_handle_enter(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial, struct wl_surface *surface, struct wl_array *keys) { - } static void keyboard_handle_leave(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial, struct wl_surface *surface) { - } static void keyboard_handle_key(void *data, struct wl_keyboard *wl_keyboard, @@ -151,7 +149,7 @@ static void keyboard_handle_key(void *data, struct wl_keyboard *wl_keyboard, wlr_event.state = state; wlr_event.time_sec = time / 1000; wlr_event.time_usec = time * 1000; - wl_signal_emit(&dev->keyboard->events.key, &wlr_event); + wlr_keyboard_update_state(dev->keyboard, &wlr_event); } static void keyboard_handle_modifiers(void *data, struct wl_keyboard *wl_keyboard, -- cgit v1.2.3