diff options
author | Scott Anderson <ascent12@hotmail.com> | 2018-03-06 19:59:10 +1300 |
---|---|---|
committer | Scott Anderson <ascent12@hotmail.com> | 2018-03-06 21:16:18 +1300 |
commit | 3c9fc7c68ec7e0474f40bedc33d55862e03af057 (patch) | |
tree | 92f33db4faf0ae3ff1f8345805303fb2c0884dd2 /backend | |
parent | 902d6cc240c5ecb5a19cf67173b968bfed34c565 (diff) |
Add const to x11 and input interfaces
Diffstat (limited to 'backend')
-rw-r--r-- | backend/headless/input_device.c | 2 | ||||
-rw-r--r-- | backend/libinput/events.c | 2 | ||||
-rw-r--r-- | backend/x11/backend.c | 10 |
3 files changed, 7 insertions, 7 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, |