aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/headless/input_device.c2
-rw-r--r--backend/libinput/events.c2
-rw-r--r--backend/x11/backend.c10
-rw-r--r--include/wlr/interfaces/wlr_input_device.h2
-rw-r--r--include/wlr/types/wlr_input_device.h2
-rw-r--r--types/wlr_input_device.c2
6 files changed, 10 insertions, 10 deletions
diff --git a/backend/headless/input_device.c b/backend/headless/input_device.c
index ea335aff..daa22436 100644
--- a/backend/headless/input_device.c
+++ b/backend/headless/input_device.c
@@ -15,7 +15,7 @@ static void input_device_destroy(struct wlr_input_device *wlr_dev) {
free(device);
}
-static struct wlr_input_device_impl input_device_impl = {
+static const struct wlr_input_device_impl input_device_impl = {
.destroy = input_device_destroy,
};
diff --git a/backend/libinput/events.c b/backend/libinput/events.c
index 603eed07..d92de830 100644
--- a/backend/libinput/events.c
+++ b/backend/libinput/events.c
@@ -31,7 +31,7 @@ static void wlr_libinput_device_destroy(struct wlr_input_device *_dev) {
free(dev);
}
-static struct wlr_input_device_impl input_device_impl = {
+static const struct wlr_input_device_impl input_device_impl = {
.destroy = wlr_libinput_device_destroy
};
diff --git a/backend/x11/backend.c b/backend/x11/backend.c
index 87ba1570..cb29e518 100644
--- a/backend/x11/backend.c
+++ b/backend/x11/backend.c
@@ -26,9 +26,9 @@
#define XCB_EVENT_RESPONSE_TYPE_MASK 0x7f
-static struct wlr_backend_impl backend_impl;
-static struct wlr_output_impl output_impl;
-static struct wlr_input_device_impl input_device_impl = { 0 };
+static const struct wlr_backend_impl backend_impl;
+static const struct wlr_output_impl output_impl;
+static const struct wlr_input_device_impl input_device_impl = { 0 };
static uint32_t xcb_button_to_wl(uint32_t button) {
switch (button) {
@@ -337,7 +337,7 @@ static struct wlr_renderer *wlr_x11_backend_get_renderer(
return x11->renderer;
}
-static struct wlr_backend_impl backend_impl = {
+static const struct wlr_backend_impl backend_impl = {
.start = wlr_x11_backend_start,
.destroy = wlr_x11_backend_destroy,
.get_egl = wlr_x11_backend_get_egl,
@@ -465,7 +465,7 @@ static bool output_swap_buffers(struct wlr_output *wlr_output,
return wlr_egl_swap_buffers(&x11->egl, output->surf, damage);
}
-static struct wlr_output_impl output_impl = {
+static const struct wlr_output_impl output_impl = {
.set_custom_mode = output_set_custom_mode,
.transform = output_transform,
.destroy = output_destroy,
diff --git a/include/wlr/interfaces/wlr_input_device.h b/include/wlr/interfaces/wlr_input_device.h
index 2a681ff8..a5c513b7 100644
--- a/include/wlr/interfaces/wlr_input_device.h
+++ b/include/wlr/interfaces/wlr_input_device.h
@@ -10,7 +10,7 @@ struct wlr_input_device_impl {
void wlr_input_device_init(
struct wlr_input_device *wlr_device,
enum wlr_input_device_type type,
- struct wlr_input_device_impl *impl,
+ const struct wlr_input_device_impl *impl,
const char *name, int vendor, int product);
void wlr_input_device_destroy(struct wlr_input_device *dev);
diff --git a/include/wlr/types/wlr_input_device.h b/include/wlr/types/wlr_input_device.h
index 306a1166..6d8e3631 100644
--- a/include/wlr/types/wlr_input_device.h
+++ b/include/wlr/types/wlr_input_device.h
@@ -24,7 +24,7 @@ enum wlr_input_device_type {
struct wlr_input_device_impl;
struct wlr_input_device {
- struct wlr_input_device_impl *impl;
+ const struct wlr_input_device_impl *impl;
enum wlr_input_device_type type;
int vendor, product;
diff --git a/types/wlr_input_device.c b/types/wlr_input_device.c
index 65d4b1d6..713d911a 100644
--- a/types/wlr_input_device.c
+++ b/types/wlr_input_device.c
@@ -14,7 +14,7 @@
void wlr_input_device_init(struct wlr_input_device *dev,
enum wlr_input_device_type type,
- struct wlr_input_device_impl *impl,
+ const struct wlr_input_device_impl *impl,
const char *name, int vendor, int product) {
dev->type = type;
dev->impl = impl;