aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-09-24 14:12:56 -0400
committerDrew DeVault <sir@cmpwn.com>2017-09-24 14:12:56 -0400
commit61e451ea1b36435341d02ae34548bd0ea3abdd57 (patch)
tree6dc756c8024b2ec679b5d70087538504a4f2d5c5 /backend
parentb84d59403fa8649817e84c486e701508f191c949 (diff)
Move keyboard logic to wlr_{keyboard,seat}
Diffstat (limited to 'backend')
-rw-r--r--backend/libinput/keyboard.c2
-rw-r--r--backend/wayland/wl_seat.c6
2 files changed, 3 insertions, 5 deletions
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,