aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Zeni <simon@bl4ckb0ne.ca>2022-01-28 13:55:28 -0500
committerKirill Primak <vyivel@eclair.cafe>2022-02-21 17:11:32 +0000
commita1978b1299952586a2fd016aab682c7fdbe735ee (patch)
treeee5c7b99fb792954ebc06a223303f70d123f024f /include
parent130c3bcf6361a76a889790e1907b78c607053659 (diff)
types/wlr_keyboard: add base wlr_input_device
wlr_keyboard owns its base wlr_input_device. It will be initialized when the keyboard is initialized, and finished when the keyboard is destroyed.
Diffstat (limited to 'include')
-rw-r--r--include/backend/x11.h1
-rw-r--r--include/wlr/interfaces/wlr_keyboard.h2
-rw-r--r--include/wlr/types/wlr_keyboard.h3
-rw-r--r--include/wlr/types/wlr_keyboard_group.h2
-rw-r--r--include/wlr/types/wlr_virtual_keyboard_v1.h2
5 files changed, 5 insertions, 5 deletions
diff --git a/include/backend/x11.h b/include/backend/x11.h
index fadcbedc..b5c430fb 100644
--- a/include/backend/x11.h
+++ b/include/backend/x11.h
@@ -81,7 +81,6 @@ struct wlr_x11_backend {
struct wl_list outputs; // wlr_x11_output::link
struct wlr_keyboard keyboard;
- struct wlr_input_device keyboard_dev;
int drm_fd;
struct wlr_drm_format_set dri3_formats;
diff --git a/include/wlr/interfaces/wlr_keyboard.h b/include/wlr/interfaces/wlr_keyboard.h
index 5d537827..4bcef57b 100644
--- a/include/wlr/interfaces/wlr_keyboard.h
+++ b/include/wlr/interfaces/wlr_keyboard.h
@@ -18,7 +18,7 @@ struct wlr_keyboard_impl {
};
void wlr_keyboard_init(struct wlr_keyboard *keyboard,
- const struct wlr_keyboard_impl *impl);
+ const struct wlr_keyboard_impl *impl, const char *name);
void wlr_keyboard_destroy(struct wlr_keyboard *keyboard);
void wlr_keyboard_notify_key(struct wlr_keyboard *keyboard,
struct wlr_event_keyboard_key *event);
diff --git a/include/wlr/types/wlr_keyboard.h b/include/wlr/types/wlr_keyboard.h
index ea16c432..b3be053a 100644
--- a/include/wlr/types/wlr_keyboard.h
+++ b/include/wlr/types/wlr_keyboard.h
@@ -13,6 +13,7 @@
#include <stdint.h>
#include <wayland-server-core.h>
#include <wayland-server-protocol.h>
+#include <wlr/types/wlr_input_device.h>
#include <xkbcommon/xkbcommon.h>
#define WLR_LED_COUNT 3
@@ -48,6 +49,8 @@ struct wlr_keyboard_modifiers {
};
struct wlr_keyboard {
+ struct wlr_input_device base;
+
const struct wlr_keyboard_impl *impl;
struct wlr_keyboard_group *group;
diff --git a/include/wlr/types/wlr_keyboard_group.h b/include/wlr/types/wlr_keyboard_group.h
index cb73899a..3906d948 100644
--- a/include/wlr/types/wlr_keyboard_group.h
+++ b/include/wlr/types/wlr_keyboard_group.h
@@ -11,11 +11,9 @@
#include <wayland-server-core.h>
#include <wlr/types/wlr_keyboard.h>
-#include <wlr/types/wlr_input_device.h>
struct wlr_keyboard_group {
struct wlr_keyboard keyboard;
- struct wlr_input_device *input_device;
struct wl_list devices; // keyboard_group_device::link
struct wl_list keys; // keyboard_group_key::link
diff --git a/include/wlr/types/wlr_virtual_keyboard_v1.h b/include/wlr/types/wlr_virtual_keyboard_v1.h
index a3f4e452..8be6158d 100644
--- a/include/wlr/types/wlr_virtual_keyboard_v1.h
+++ b/include/wlr/types/wlr_virtual_keyboard_v1.h
@@ -26,7 +26,7 @@ struct wlr_virtual_keyboard_manager_v1 {
};
struct wlr_virtual_keyboard_v1 {
- struct wlr_input_device input_device;
+ struct wlr_keyboard keyboard;
struct wl_resource *resource;
struct wlr_seat *seat;
bool has_keymap;