aboutsummaryrefslogtreecommitdiff
path: root/backend/libinput/keyboard.c
diff options
context:
space:
mode:
authorSimon Zeni <simon@bl4ckb0ne.ca>2022-02-09 16:03:12 -0500
committerSimon Zeni <simon@bl4ckb0ne.ca>2022-02-21 16:48:43 -0500
commit91ba28e020092089eb9cc960530355de68c60a3d (patch)
treefee441c8caab6771d875abeac46aa776edeabc0e /backend/libinput/keyboard.c
parent887516d004ca5c5f35e99fd36f4b30f649f1c2f8 (diff)
backend/libinput: remove wlr_input_device_impl
Diffstat (limited to 'backend/libinput/keyboard.c')
-rw-r--r--backend/libinput/keyboard.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/backend/libinput/keyboard.c b/backend/libinput/keyboard.c
index be5faf3e..9127217a 100644
--- a/backend/libinput/keyboard.c
+++ b/backend/libinput/keyboard.c
@@ -2,7 +2,6 @@
#include <libinput.h>
#include <stdlib.h>
#include <wlr/backend/session.h>
-#include <wlr/interfaces/wlr_keyboard.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/util/log.h>
#include "backend/libinput.h"
@@ -12,11 +11,9 @@ struct wlr_libinput_keyboard {
struct libinput_device *libinput_dev;
};
-static const struct wlr_keyboard_impl impl;
-
static struct wlr_libinput_keyboard *get_libinput_keyboard_from_keyboard(
struct wlr_keyboard *wlr_kb) {
- assert(wlr_kb->impl == &impl);
+ assert(wlr_kb->impl == &libinput_keyboard_impl);
return (struct wlr_libinput_keyboard *)wlr_kb;
}
@@ -33,7 +30,7 @@ static void keyboard_destroy(struct wlr_keyboard *wlr_kb) {
free(kb);
}
-static const struct wlr_keyboard_impl impl = {
+const struct wlr_keyboard_impl libinput_keyboard_impl = {
.destroy = keyboard_destroy,
.led_update = keyboard_set_leds
};
@@ -50,7 +47,7 @@ struct wlr_keyboard *create_libinput_keyboard(
libinput_device_led_update(libinput_dev, 0);
struct wlr_keyboard *wlr_kb = &kb->wlr_keyboard;
const char *name = libinput_device_get_name(libinput_dev);
- wlr_keyboard_init(wlr_kb, &impl, name);
+ wlr_keyboard_init(wlr_kb, &libinput_keyboard_impl, name);
wlr_kb->base.vendor = libinput_device_get_id_vendor(libinput_dev);
wlr_kb->base.product = libinput_device_get_id_product(libinput_dev);
return wlr_kb;